### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java,v retrieving revision 1.68 diff -u -r1.68 AbstractCommentParser.java --- compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 16 Jul 2007 20:02:16 -0000 1.68 +++ compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 16 Jul 2007 20:15:33 -0000 @@ -861,16 +861,22 @@ // Report problem this.currentTokenType = -1; if (isCompletionParser) return false; - end = hasMultiLines ? this.lineEnd: this.scanner.getCurrentTokenEndPosition(); - while ((token=readToken()) != TerminalTokens.TokenNameWHITESPACE && token != TerminalTokens.TokenNameEOF) { - this.currentTokenType = -1; + if (this.reportProblems) { + // we only need end if we report problems end = hasMultiLines ? this.lineEnd: this.scanner.getCurrentTokenEndPosition(); - } - if (this.reportProblems) + try { + while ((token=readToken()) != TerminalTokens.TokenNameWHITESPACE && token != TerminalTokens.TokenNameEOF) { + this.currentTokenType = -1; + end = hasMultiLines ? this.lineEnd: this.scanner.getCurrentTokenEndPosition(); + } + } catch (InvalidInputException e) { + end = lineEnd; + } if (mayBeGeneric && isTypeParam) this.sourceParser.problemReporter().javadocInvalidParamTypeParameter(start, end); else this.sourceParser.problemReporter().javadocInvalidParamTagName(start, end); + } this.scanner.currentPosition = start; this.index = start; this.currentTokenType = -1;