Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 121235 - NPE from refactoring change parameters
NPE from refactoring change parameters
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Refactoring
6.x
All All
: P1 (vote)
: 6.x
Assigned To: issues@java
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-05 23:42 UTC by err
Modified: 2007-11-12 14:53 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
messages log with exception (74.88 KB, text/plain)
2007-11-05 23:48 UTC, err
Details

Note You need to log in before you can comment on or make changes to this bug.
Description err 2007-11-05 23:42:35 UTC
Build 200711050000

Adding (appending) an integer parameter to a method in an interface, the method originally had 3 parameters.
((ViFactory::  public ViOutputStream createOutputStream(ViTextView tv, Object type, Object info);))

Hit Preview button. Got to around 20%, then NPE and dialog asking for a bug report with messages.log
Comment 1 err 2007-11-05 23:48:28 UTC
Created attachment 52561 [details]
messages log with exception
Comment 2 Jiri Prox 2007-11-06 08:34:09 UTC
This is common usecase, it should be fixed in 6.0 -> increasing priority
Comment 3 Jan Becicka 2007-11-06 08:39:17 UTC
Checking in ChangeParamsTransformer.java;
/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java,v  <-- 
ChangeParamsTransformer.java
new revision: 1.10; previous revision: 1.9
done
Comment 4 err 2007-11-06 18:01:44 UTC
 Keywords|      |60_HR_FIX

So I'm guessing things are at the stage where only "approved" changes can go in. And this keyword flags the change as a
candidate for 6.0.
Comment 5 Jan Becicka 2007-11-07 06:34:43 UTC
http://refactoring.netbeans.org/source/browse/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java?r1=1.9&r2=1.10

I'd like to ask for review. Fix is similar to issue 119269.
Problem is in method isMethodMatch, which throws NPE if it cannot resolve some element. But it should simply return
false, because element can be unknown in context of current file.
Comment 6 Jan Pokorsky 2007-11-07 09:58:11 UTC
Reviewed, the fix should work.
Comment 7 Jiri Prox 2007-11-07 10:33:47 UTC
verified in trunk, the fix can go to 6.0
Comment 8 Jan Becicka 2007-11-07 14:08:55 UTC
Fixed in 6.0
Checking in ChangeParamsTransformer.java;
/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java,v  <-- 
ChangeParamsTransformer.java
new revision: 1.9.4.1; previous revision: 1.9
done
Comment 9 Jiri Prox 2007-11-12 14:53:03 UTC
verified in RC1


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