Project: JDT
Bug 239833 [compiler] Odd compiler error message "Illegal modifier for the method ..."
Reported: 2008-07-07 13:23:44 | Status: verified fixed

I20080702-0939 public class Try { //Illegal modifier for the method Try.Try(): public synchronized Try(int a) { } //Illegal modifier for the method Try.Try(): public final static Try() { } //Illegal modifier for the method m.Try(): public volatile void m() { } //Illegal modifier for the field fField; only public, protected, // private, static, final, transient & volatile are permitted public synchronized int fField; } The errors for illegal modifiers on methods and constructors are a bit odd: - Range is the method & parameter list => Expected: The actually illegal modifier - Talk about method even for constructors - Would be nice if they listed the allowed modifiers (as in the error for fields)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java