Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 176784 - Renaming a method parameter makes javadocs from other methods containing the same parameter name gets refactored
Renaming a method parameter makes javadocs from other methods containing the ...
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Javadoc
6.x
All All
: P3 (vote)
: 6.x
Assigned To: issues@java
issues@java
68patch1-verified
:
: 179189 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-13 06:13 UTC by fmonsalvo
Modified: 2011-11-16 16:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fmonsalvo 2009-11-13 06:13:56 UTC
Lets say I have methodOne and methodTwo, both containing a variable named "user" and both methods have their javadoc written.
If I change methodOne user parameter to "person" both methodOne and methodTwo javadocs get changed.
Comment 1 Jan Pokorsky 2009-11-26 07:20:35 UTC
Reproducible. Thank you for the report.
Comment 2 Jan Pokorsky 2009-11-27 04:12:45 UTC
fixed jet-main#9082b0fbc7e9

I suggest to add it to 68patch.
Comment 3 fmonsalvo 2009-11-27 06:34:18 UTC
Thanks, I would love to have this fixed on 6.8.
Comment 4 Quality Engineering 2009-11-28 03:23:00 UTC
Integrated into 'main-golden', will be available in build *200911280200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9082b0fbc7e9
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #176784: compare parameter/type parameter as Element and not just name not to modify unrelated javadocs where are params with same name
Comment 5 Jan Pokorsky 2010-01-04 07:26:09 UTC
*** Bug 179189 has been marked as a duplicate of this bug. ***
Comment 6 Peter Pis 2010-01-13 04:59:39 UTC
Reopen.
===
   /**
     *
     * @param user
     */
    void methodOne(String user) {}

    /**
     *
     * @param user
     */
    void methodTwo(String user) {}
===

Renaming "user" causes both javadoc param modification either.
Comment 7 Jan Lahoda 2010-01-18 01:39:52 UTC
I think there might be a slight confusion: there are two rename operations in the IDE: instant rename (renames only "local" elements, and the rename is directly done in the editor) and full refactoring. 9082b0fbc7e9 seems to correctly fix instant rename. Full refactoring may be a bit more difficult - it currently has option to "rename in comments", which, when on, simply renames the identifier in the comments and does not touch comments when off. Probably the refactoring should rename resolvable elements inside Javadoc even if "rename in comments" is off.

I propose to create a new bug for the full refactoring, and change scope of this bug to only instant rename, and push the above fix to a patch release. (Because I think that instant rename is used for renaming parameters much more often than the full refactoring.)
Comment 8 Peter Pis 2010-01-19 09:01:21 UTC
Ok. Understood. Verified.
Comment 9 pgebauer 2010-01-20 04:02:41 UTC
The fix has been ported into the release68_fixes repository.
http://hg.netbeans.org/release68_fixes/rev/5c55e5e55b92
Comment 10 Peter Pis 2010-01-25 08:01:39 UTC
V.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo