diff -r 7c537f4298fb -r 17b271281525 src/share/classes/com/sun/tools/javac/parser/JavacParser.java --- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Mon Jan 10 15:08:31 2011 -0800 +++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Tue Jan 11 08:05:28 2011 -0800 @@ -2569,6 +2569,12 @@ } else { pos = S.pos(); List typarams = typeParametersOpt(); + // if there are type parameters but no modifiers, save the start + // position of the method in the modifiers. + if (typarams.nonEmpty() && mods.pos == Position.NOPOS) { + mods.pos = pos; + storeEnd(mods, pos); + } Name name = S.name(); pos = S.pos(); JCExpression type;