src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java

changeset 1409
33abf479f202
parent 1282
3468519d9b45
child 1529
950d8195a5a4
     1.1 --- a/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java	Wed Nov 14 16:41:51 2012 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java	Wed Nov 14 17:23:10 2012 -0800
     1.3 @@ -234,10 +234,12 @@
     1.4              // If we find an exact match for pos, the other item in the pair
     1.5              // gives the source pos; otherwise, compute the source position
     1.6              // relative to the best match found in the array.
     1.7 +            if (pos == Position.NOPOS)
     1.8 +                return Position.NOPOS;
     1.9              if (pos < 0 || pos >= docComment.length())
    1.10 -                throw new StringIndexOutOfBoundsException();
    1.11 +                throw new StringIndexOutOfBoundsException(String.valueOf(pos));
    1.12              if (docPosns == null)
    1.13 -                return -1;
    1.14 +                return Position.NOPOS;
    1.15              int start = 0;
    1.16              int end = docPosns.length;
    1.17              while (start < end - 2) {

mercurial