src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java

changeset 816
7c537f4298fb
parent 815
d17f37522154
child 872
a19b1f4f23c9
     1.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Jan 10 14:57:59 2011 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Jan 10 15:08:31 2011 -0800
     1.3 @@ -65,6 +65,7 @@
     1.4  import com.sun.tools.javac.tree.*;
     1.5  import com.sun.tools.javac.tree.JCTree.*;
     1.6  import com.sun.tools.javac.util.Abort;
     1.7 +import com.sun.tools.javac.util.Assert;
     1.8  import com.sun.tools.javac.util.Context;
     1.9  import com.sun.tools.javac.util.Convert;
    1.10  import com.sun.tools.javac.util.FatalError;
    1.11 @@ -1046,17 +1047,17 @@
    1.12              Context next = new Context();
    1.13  
    1.14              Options options = Options.instance(context);
    1.15 -            assert options != null;
    1.16 +            Assert.checkNonNull(options);
    1.17              next.put(Options.optionsKey, options);
    1.18  
    1.19              PrintWriter out = context.get(Log.outKey);
    1.20 -            assert out != null;
    1.21 +            Assert.checkNonNull(out);
    1.22              next.put(Log.outKey, out);
    1.23  
    1.24              final boolean shareNames = true;
    1.25              if (shareNames) {
    1.26                  Names names = Names.instance(context);
    1.27 -                assert names != null;
    1.28 +                Assert.checkNonNull(names);
    1.29                  next.put(Names.namesKey, names);
    1.30              }
    1.31  
    1.32 @@ -1069,18 +1070,18 @@
    1.33                  next.put(TaskListener.class, tl);
    1.34  
    1.35              JavaFileManager jfm = context.get(JavaFileManager.class);
    1.36 -            assert jfm != null;
    1.37 +            Assert.checkNonNull(jfm);
    1.38              next.put(JavaFileManager.class, jfm);
    1.39              if (jfm instanceof JavacFileManager) {
    1.40                  ((JavacFileManager)jfm).setContext(next);
    1.41              }
    1.42  
    1.43              Names names = Names.instance(context);
    1.44 -            assert names != null;
    1.45 +            Assert.checkNonNull(names);
    1.46              next.put(Names.namesKey, names);
    1.47  
    1.48              Keywords keywords = Keywords.instance(context);
    1.49 -            assert(keywords != null);
    1.50 +            Assert.checkNonNull(keywords);
    1.51              next.put(Keywords.keywordsKey, keywords);
    1.52  
    1.53              JavaCompiler oldCompiler = JavaCompiler.instance(context);
    1.54 @@ -1239,7 +1240,7 @@
    1.55              for (JCTree node : unit.defs) {
    1.56                  if (node.getTag() == JCTree.CLASSDEF) {
    1.57                      ClassSymbol sym = ((JCClassDecl) node).sym;
    1.58 -                    assert sym != null;
    1.59 +                    Assert.checkNonNull(sym);
    1.60                      classes = classes.prepend(sym);
    1.61                  }
    1.62              }

mercurial