To reproduce
package a;
import b.ChildClass;
import b.ParentClass;
public class Snippet {
public static void main(String[] args) {
Util.doNothing(new ParentClass[] {new ChildClass()});
}
}
package a;
import b.ParentClass;
public class Util {
static void doNothing(ParentClass... p) {}
}
package b;
public class ChildClass extends ParentClass {}
package b;
public class ParentClass {}
- Apply these 2 cleanups in the project (they are in the tab called Unnecessary code)

Expected result
The class Snippet looks like this:
package a;
import b.ChildClass;
public class Snippet {
public static void main(String[] args) {
Util.doNothing(new ChildClass());
}
}
Actual result
There is 1 unnecessary import: import b.ParentClass;
package a;
import b.ChildClass;
import b.ParentClass;
public class Snippet {
public static void main(String[] args) {
Util.doNothing(new ChildClass());
}
}
To reproduce
Expected result
The class
Snippetlooks like this:Actual result
There is 1 unnecessary import:
import b.ParentClass;