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.
dev build 200312141900 There are multiple issues in Netbeans that prevent it from properly handling the case where interface X1.Y is implemented by X2.Y 1) If Import Management Tool is run on: package X2; class Y implements X1.Y it'll modify the source-code file to read: package X2; class Y implements Y which results in a compiler error. 2) Furthermore, if X1.Y has a method: public void name(X1.Z value); but X2.Z also exists then running the SYNCHRONIZATION tool on it will result in pasting: public void name(Z value); into the implementing class X2.Y which also results in a compiler-error because X2.Z is the implementation for X1.Z and the function being implemented specifically refers to the interface X1.Z not the implementation X2.Z I am filing this issue because I deal with these issues on a daily basis with Netbeans. I always place all interfaces into one package and all implementations into another. Getting this to work under Netbeans is nearly impossible and is extremely frustrating to constantly correct compiler-errors the tool itself keeps on generating. Can you please assess how much work would be required to fix this issue? Thank you, Gili
Here is a proposed fix for the problem I've reported: Given: - file being compiled is source.java, inside package "localPackage" - source.java contains references to otherPackage.className - The directory associated with "localPackage" contains a file called "className.java" or "className.class" --> Do not remove package name "otherPackage" I believe this will solve all the problems I have reported and it should be quite easy to implement.
Created attachment 12705 [details] Simple patch fixing the problem
*** Issue 38154 has been marked as a duplicate of this issue. ***
ad 1) the patch seems to fix this and looks OK ad 2) this works for me Since we are in high resistance mode it is not possible to intagrate it to release36 and so the target milestone rearranged.
Closing, Import Management Tools was replaced by Fix Import functionality.