langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
changeset 8033 13d9c18b8fa1
parent 8032 e1aa25ccdabb
child 8047 c7f08cdb5c3c
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Jan 10 15:08:31 2011 -0800
+++ b/langtools/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<JCTypeParameter> 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;