This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I modified the interface of a base class to an inner class defined else where. The first time I modified it the IDE noticed and correctly updated the interface in the subclasses (although it did miss a couple of instances in another class). I then realized that I had forgotten to add an argument so I went back to the base class and modified the argument list again. It again noted the change however this time it incorrectly updated the method declared. More precisely it added a second public modifier to the start and moved the next line up and joined it on the end. Below is a fully diagrammatic explanation. How it started ~~~~~File one~~~~~~~~~~~ public class Foo { public abstract List wibble(); } ~~~~~~File two~~~~~~~~~~~~ public class Bar { …stuff… private class FooInner extends Foo { public abstract List wibble() { System.out.print( “flib” ); ..stuff… } } } How it ended up ~~~~~File one~~~~~~~~~~~ public class Foo { public abstract List wibble( List a, String b, Stuff c); } ~~~~~~File two~~~~~~~~~~~~ public class Bar { …stuff… private class FooInner extends Foo { public public abstract List wibble( List a, String b, Stuff c) System.out.print( “flib” ); ..stuff… } } }
Sorry accidently hit commit before I had correctly formatted the code snippet so here it is in full. NOTE although it looks like the System out and the line with public public starting it are seperate they have actually been moved up to the same line in the broken version How it started ~~~~~File one~~~~~~~~~~~ public class Foo { public abstract List wibble(); } ~~~~~~File two~~~~~~~~~~~~ public class Bar { ...stuff... private class FooInner extends Foo { public abstract List wibble() { System.out.print( "flib" ); ...stuff... } } } How it ended up ~~~~~File one~~~~~~~~~~~ public class Foo { public abstract List wibble( List a, String b, Stuff c); } ~~~~~~File two~~~~~~~~~~~~ public class Bar { ...stuff... private class FooInner extends Foo { public public abstract List wibble( List a, String b, stuff c) System.out.print( "flib" ); ...stuff... } } }
It is not editor feature. I think, this is implemented in java module. Reassign if I am wrong.
Graham, if you can still reproduce the bug on the class "Bar", could you, please send us (== attach here) the exact source of Bar.java ?
I just followed your example, but I was not unable to reproduce it. Can you attach your two files (Foo.java and Bar.java) before modification and provide exact steps how to reproduce this it. Thanks.
Created attachment 4050 [details] The foo base class
Created attachment 4051 [details] The bar class that shows the problem
Created attachment 4052 [details] The foo class after I have changed its arguments
Created attachment 4053 [details] The bar class after the arguments have been changed in foo
To reproduce. 1. Open the Foo.java file (12:24 PST) and the Bar.java file (12:25 PST) 2. Add an argument to the wibble method of foo. I changed the method signature from abstract void wibble( String flib ); to abstract void wibble( String flib, String other ); (See foo.java 12:27 PST) 3. Wait a moment for netbeans to detect the change. 4. When asked to update press the 'process all' button. 5. View Bar.java and note the messed up method signature (12:27 PST) Hope this helps
Graham, did you use Beta version of Java module with Javac 1.4 parser?
*** This issue has been marked as a duplicate of 18584 ***
Resolved for 3.3.x or earlier, no new info since then -> closing.
Resolved for 3.4.x or earlier, no new info since then -> closing.
Reorganization of java component