1.1 --- a/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java Mon Jan 10 14:57:59 2011 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java Mon Jan 10 15:08:31 2011 -0800 1.3 @@ -122,15 +122,15 @@ 1.4 public JCCompilationUnit TopLevel(List<JCAnnotation> packageAnnotations, 1.5 JCExpression pid, 1.6 List<JCTree> defs) { 1.7 - assert packageAnnotations != null; 1.8 + Assert.checkNonNull(packageAnnotations); 1.9 for (JCTree node : defs) 1.10 - assert node instanceof JCClassDecl 1.11 + Assert.check(node instanceof JCClassDecl 1.12 || node instanceof JCImport 1.13 || node instanceof JCSkip 1.14 || node instanceof JCErroneous 1.15 || (node instanceof JCExpressionStatement 1.16 - && ((JCExpressionStatement)node).expr instanceof JCErroneous) 1.17 - : node.getClass().getSimpleName(); 1.18 + && ((JCExpressionStatement)node).expr instanceof JCErroneous), 1.19 + node.getClass().getSimpleName()); 1.20 JCCompilationUnit tree = new JCCompilationUnit(packageAnnotations, pid, defs, 1.21 null, null, null, null); 1.22 tree.pos = pos; 1.23 @@ -647,19 +647,14 @@ 1.24 } 1.25 return tp.setType(t); 1.26 } 1.27 -//where 1.28 - private JCExpression Selectors(JCExpression base, Symbol sym, Symbol limit) { 1.29 - if (sym == limit) return base; 1.30 - else return Select(Selectors(base, sym.owner, limit), sym); 1.31 - } 1.32 1.33 /** Create a list of trees representing given list of types. 1.34 */ 1.35 public List<JCExpression> Types(List<Type> ts) { 1.36 - ListBuffer<JCExpression> types = new ListBuffer<JCExpression>(); 1.37 + ListBuffer<JCExpression> lb = new ListBuffer<JCExpression>(); 1.38 for (List<Type> l = ts; l.nonEmpty(); l = l.tail) 1.39 - types.append(Type(l.head)); 1.40 - return types.toList(); 1.41 + lb.append(Type(l.head)); 1.42 + return lb.toList(); 1.43 } 1.44 1.45 /** Create a variable definition from a variable symbol and an initializer