src/share/classes/com/sun/tools/javac/jvm/ClassReader.java

changeset 700
7b413ac1a720
parent 688
50f9ac2f4730
child 752
03177f49411d
     1.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Wed Sep 29 23:27:57 2010 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Sep 30 10:47:12 2010 -0700
     1.3 @@ -56,6 +56,8 @@
     1.4  import static com.sun.tools.javac.jvm.ClassFile.*;
     1.5  import static com.sun.tools.javac.jvm.ClassFile.Version.*;
     1.6  
     1.7 +import static com.sun.tools.javac.main.OptionName.*;
     1.8 +
     1.9  /** This class provides operations to read a classfile into an internal
    1.10   *  representation. The internal representation is anchored in a
    1.11   *  ClassSymbol which contains in its scope symbol representations
    1.12 @@ -259,23 +261,23 @@
    1.13  
    1.14          Options options = Options.instance(context);
    1.15          annotate = Annotate.instance(context);
    1.16 -        verbose        = options.get("-verbose")        != null;
    1.17 -        checkClassFile = options.get("-checkclassfile") != null;
    1.18 +        verbose        = options.isSet(VERBOSE);
    1.19 +        checkClassFile = options.isSet("-checkclassfile");
    1.20          Source source = Source.instance(context);
    1.21          allowGenerics    = source.allowGenerics();
    1.22          allowVarargs     = source.allowVarargs();
    1.23          allowAnnotations = source.allowAnnotations();
    1.24 -        saveParameterNames = options.get("save-parameter-names") != null;
    1.25 -        cacheCompletionFailure = options.get("dev") == null;
    1.26 +        saveParameterNames = options.isSet("save-parameter-names");
    1.27 +        cacheCompletionFailure = options.isUnset("dev");
    1.28          preferSource = "source".equals(options.get("-Xprefer"));
    1.29  
    1.30          completionFailureName =
    1.31 -            (options.get("failcomplete") != null)
    1.32 +            options.isSet("failcomplete")
    1.33              ? names.fromString(options.get("failcomplete"))
    1.34              : null;
    1.35  
    1.36          typevars = new Scope(syms.noSymbol);
    1.37 -        debugJSR308 = options.get("TA:reader") != null;
    1.38 +        debugJSR308 = options.isSet("TA:reader");
    1.39  
    1.40          initAttributeReaders();
    1.41      }

mercurial