6931482: minor findbugs fixes

Tue, 02 Mar 2010 16:40:37 -0800

author
jjg
date
Tue, 02 Mar 2010 16:40:37 -0800
changeset 513
6e1e2738c530
parent 512
7c23bbbe0dbd
child 514
235135d61974

6931482: minor findbugs fixes
Reviewed-by: darcy

src/share/classes/com/sun/tools/classfile/ConstantPool.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javadoc/DocEnv.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javadoc/SeeTagImpl.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/classfile/ConstantPool.java	Tue Mar 02 14:06:47 2010 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/classfile/ConstantPool.java	Tue Mar 02 16:40:37 2010 -0800
     1.3 @@ -40,7 +40,7 @@
     1.4   */
     1.5  public class ConstantPool {
     1.6  
     1.7 -    public class InvalidIndex extends ConstantPoolException {
     1.8 +    public static class InvalidIndex extends ConstantPoolException {
     1.9          private static final long serialVersionUID = -4350294289300939730L;
    1.10          InvalidIndex(int index) {
    1.11              super(index);
    1.12 @@ -53,7 +53,7 @@
    1.13          }
    1.14      }
    1.15  
    1.16 -    public class UnexpectedEntry extends ConstantPoolException {
    1.17 +    public static class UnexpectedEntry extends ConstantPoolException {
    1.18          private static final long serialVersionUID = 6986335935377933211L;
    1.19          UnexpectedEntry(int index, int expected_tag, int found_tag) {
    1.20              super(index);
    1.21 @@ -71,7 +71,7 @@
    1.22          public final int found_tag;
    1.23      }
    1.24  
    1.25 -    public class InvalidEntry extends ConstantPoolException {
    1.26 +    public static class InvalidEntry extends ConstantPoolException {
    1.27          private static final long serialVersionUID = 1000087545585204447L;
    1.28          InvalidEntry(int index, int tag) {
    1.29              super(index);
    1.30 @@ -87,7 +87,7 @@
    1.31          public final int tag;
    1.32      }
    1.33  
    1.34 -    public class EntryNotFound extends ConstantPoolException {
    1.35 +    public static class EntryNotFound extends ConstantPoolException {
    1.36          private static final long serialVersionUID = 2885537606468581850L;
    1.37          EntryNotFound(Object value) {
    1.38              super(-1);
    1.39 @@ -694,7 +694,7 @@
    1.40          public int byteLength() {
    1.41              class SizeOutputStream extends OutputStream {
    1.42                  @Override
    1.43 -                public void write(int b) throws IOException {
    1.44 +                public void write(int b) {
    1.45                      size++;
    1.46                  }
    1.47                  int size;
     2.1 --- a/src/share/classes/com/sun/tools/javadoc/DocEnv.java	Tue Mar 02 14:06:47 2010 -0800
     2.2 +++ b/src/share/classes/com/sun/tools/javadoc/DocEnv.java	Tue Mar 02 16:40:37 2010 -0800
     2.3 @@ -34,7 +34,6 @@
     2.4  import com.sun.tools.javac.code.*;
     2.5  import com.sun.tools.javac.code.Symbol.*;
     2.6  import com.sun.tools.javac.code.Type.ClassType;
     2.7 -import com.sun.tools.javac.comp.Attr;
     2.8  import com.sun.tools.javac.comp.Check;
     2.9  import com.sun.tools.javac.tree.JCTree.*;
    2.10  import com.sun.tools.javac.util.Context;
    2.11 @@ -73,10 +72,6 @@
    2.12      /** Referenced directly in RootDocImpl. */
    2.13      JavadocClassReader reader;
    2.14  
    2.15 -    /** The compiler's attribution phase (needed to evaluate
    2.16 -     *  constant initializers). */
    2.17 -    Attr attr;
    2.18 -
    2.19      /** Javadoc's own version of the compiler's enter phase. */
    2.20      JavadocEnter enter;
    2.21  
    2.22 @@ -91,8 +86,6 @@
    2.23      /** Access filter (public, protected, ...).  */
    2.24      ModifierFilter showAccess;
    2.25  
    2.26 -    private ClassDocImpl runtimeException;
    2.27 -
    2.28      /** True if we are using a sentence BreakIterator. */
    2.29      boolean breakiterator;
    2.30  
    2.31 @@ -129,7 +122,6 @@
    2.32          syms = Symtab.instance(context);
    2.33          reader = JavadocClassReader.instance0(context);
    2.34          enter = JavadocEnter.instance0(context);
    2.35 -        attr = Attr.instance(context);
    2.36          names = Names.instance(context);
    2.37          externalizableSym = reader.enterClass(names.fromString("java.io.Externalizable"));
    2.38          chk = Check.instance(context);
     3.1 --- a/src/share/classes/com/sun/tools/javadoc/SeeTagImpl.java	Tue Mar 02 14:06:47 2010 -0800
     3.2 +++ b/src/share/classes/com/sun/tools/javadoc/SeeTagImpl.java	Tue Mar 02 16:40:37 2010 -0800
     3.3 @@ -349,12 +349,12 @@
     3.4      // (int i, String s) ==> [0] = "int",  [1] = String
     3.5      // (int[][], String[]) ==> [0] = "int[][]" // [1] = "String[]"
     3.6      class ParameterParseMachine {
     3.7 -        final int START = 0;
     3.8 -        final int TYPE = 1;
     3.9 -        final int NAME = 2;
    3.10 -        final int TNSPACE = 3;  // space between type and name
    3.11 -        final int ARRAYDECORATION = 4;
    3.12 -        final int ARRAYSPACE = 5;
    3.13 +        static final int START = 0;
    3.14 +        static final int TYPE = 1;
    3.15 +        static final int NAME = 2;
    3.16 +        static final int TNSPACE = 3;  // space between type and name
    3.17 +        static final int ARRAYDECORATION = 4;
    3.18 +        static final int ARRAYSPACE = 5;
    3.19  
    3.20          String parameters;
    3.21  

mercurial