Project: JDT
Bug 24444 Override Object#toString() method when a String class exist in the package
Reported: 2002-10-07 09:28:04 | Status: resolved fixed

Build I20021001 Linux-GTK 1. create the following compilation unit : public class String { } 2. Override Object#toString() (source -> override/implement method) the following code is added : public String toString() { return super.toString(); } 3. Compile. The compiler complains : The return type is incompatible with Object.toString() Type mismatch: cannot convert from java.lang.String to String The code generated should be : public java.lang.String toString() { return super.toString(); } This test case is just one example of the problem. It should be possible to generated the same result with other classes/methods.

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/ImportsStructure.java