6931482: minor findbugs fixes

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2010-03-02 16:40:37 -08:00
parent 2b4f43efeb
commit d55b727361
3 changed files with 11 additions and 19 deletions

View File

@ -40,7 +40,7 @@ import java.util.Iterator;
*/
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 ConstantPool {
}
}
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 class ConstantPool {
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 class ConstantPool {
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 class ConstantPool {
public int byteLength() {
class SizeOutputStream extends OutputStream {
@Override
public void write(int b) throws IOException {
public void write(int b) {
size++;
}
int size;

View File

@ -34,7 +34,6 @@ import com.sun.javadoc.*;
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 @@ public class DocEnv {
/** 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 @@ public class DocEnv {
/** Access filter (public, protected, ...). */
ModifierFilter showAccess;
private ClassDocImpl runtimeException;
/** True if we are using a sentence BreakIterator. */
boolean breakiterator;
@ -129,7 +122,6 @@ public class DocEnv {
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);

View File

@ -349,12 +349,12 @@ class SeeTagImpl extends TagImpl implements SeeTag, LayoutCharacters {
// (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;