Community
Participate
Working Groups
The summary doesn't quite do it justice, so I will try to explain better. The problem occurs when I change an Interface to no longer extend another Interface. In this case the Car interface is changed to no longer extend the Vehicle interface. What happens is that methods returning an implementation of the Car interface as a Vehicle do not show up as errors. Example: I have 4 java files, all in the same package: Vehicle.java: public interface Vehicle { } Car.java: public interface Car extends Vehicle { } CarImpl.java: public CarImpl implements Car { } Test.java: public class Test { public Vehicle createVehicle() { return new CarImpl(); } } Now remove the "extends Vehicle" line from the Car interface, and save it. You will get no errors in class Test. When you open the class, you do see the error, and when you modify/save it is also pops in the problems list. I first noticed this problem in a large project where I removed an interface from the extends clause of another interface. I got dozens of errors, fixed them all, but some errors never showed up. Only after a full rebuild did they show. The example above is the smallest example that reproduces this problem (AFAIK).
Suspect the following may have been also broken before we optimized out member receiver hierarchies: public Vehicle createVehicle(CarImpl car) { return car; }
Added DependencyTests.testInterfaceDeleting()
Verified in 200412140800.