OpenJDK / jdk / jdk10
changeset 5010:c9fd6294653a
6931482: minor findbugs fixes
Reviewed-by: darcy
author | jjg |
---|---|
date | Tue, 02 Mar 2010 16:40:37 -0800 |
parents | 4e3d2ff7d629 |
children | 428dd17fdb26 |
files | langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java langtools/src/share/classes/com/sun/tools/javadoc/SeeTagImpl.java |
diffstat | 3 files changed, 11 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue Mar 02 14:06:47 2010 -0800 +++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue Mar 02 16:40:37 2010 -0800 @@ -40,7 +40,7 @@ */ public class ConstantPool { - public class InvalidIndex extends ConstantPoolException { + public static class InvalidIndex extends ConstantPoolException { private static final long serialVersionUID = -4350294289300939730L; InvalidIndex(int index) { super(index); @@ -53,7 +53,7 @@ } } - public class UnexpectedEntry extends ConstantPoolException { + public static class UnexpectedEntry extends ConstantPoolException { private static final long serialVersionUID = 6986335935377933211L; UnexpectedEntry(int index, int expected_tag, int found_tag) { super(index); @@ -71,7 +71,7 @@ public final int found_tag; } - public class InvalidEntry extends ConstantPoolException { + public static class InvalidEntry extends ConstantPoolException { private static final long serialVersionUID = 1000087545585204447L; InvalidEntry(int index, int tag) { super(index); @@ -87,7 +87,7 @@ public final int tag; } - public class EntryNotFound extends ConstantPoolException { + public static class EntryNotFound extends ConstantPoolException { private static final long serialVersionUID = 2885537606468581850L; EntryNotFound(Object value) { super(-1); @@ -694,7 +694,7 @@ public int byteLength() { class SizeOutputStream extends OutputStream { @Override - public void write(int b) throws IOException { + public void write(int b) { size++; } int size;
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java Tue Mar 02 14:06:47 2010 -0800 +++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java Tue Mar 02 16:40:37 2010 -0800 @@ -34,7 +34,6 @@ import com.sun.tools.javac.code.*; import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.code.Type.ClassType; -import com.sun.tools.javac.comp.Attr; import com.sun.tools.javac.comp.Check; import com.sun.tools.javac.tree.JCTree.*; import com.sun.tools.javac.util.Context; @@ -73,10 +72,6 @@ /** Referenced directly in RootDocImpl. */ JavadocClassReader reader; - /** The compiler's attribution phase (needed to evaluate - * constant initializers). */ - Attr attr; - /** Javadoc's own version of the compiler's enter phase. */ JavadocEnter enter; @@ -91,8 +86,6 @@ /** Access filter (public, protected, ...). */ ModifierFilter showAccess; - private ClassDocImpl runtimeException; - /** True if we are using a sentence BreakIterator. */ boolean breakiterator; @@ -129,7 +122,6 @@ syms = Symtab.instance(context); reader = JavadocClassReader.instance0(context); enter = JavadocEnter.instance0(context); - attr = Attr.instance(context); names = Names.instance(context); externalizableSym = reader.enterClass(names.fromString("java.io.Externalizable")); chk = Check.instance(context);
--- a/langtools/src/share/classes/com/sun/tools/javadoc/SeeTagImpl.java Tue Mar 02 14:06:47 2010 -0800 +++ b/langtools/src/share/classes/com/sun/tools/javadoc/SeeTagImpl.java Tue Mar 02 16:40:37 2010 -0800 @@ -349,12 +349,12 @@ // (int i, String s) ==> [0] = "int", [1] = String // (int[][], String[]) ==> [0] = "int[][]" // [1] = "String[]" class ParameterParseMachine { - final int START = 0; - final int TYPE = 1; - final int NAME = 2; - final int TNSPACE = 3; // space between type and name - final int ARRAYDECORATION = 4; - final int ARRAYSPACE = 5; + static final int START = 0; + static final int TYPE = 1; + static final int NAME = 2; + static final int TNSPACE = 3; // space between type and name + static final int ARRAYDECORATION = 4; + static final int ARRAYSPACE = 5; String parameters;