1.1 --- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Mon Jan 10 14:57:59 2011 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Mon Jan 10 15:08:31 2011 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -848,7 +848,7 @@ 1.11 break; 1.12 1.13 default: 1.14 - assert false: "unknown compile policy"; 1.15 + Assert.error("unknown compile policy"); 1.16 } 1.17 } catch (Abort ex) { 1.18 if (devVerbose) 1.19 @@ -1066,7 +1066,7 @@ 1.20 classSymbols = classSymbols.prepend((ClassSymbol)sym); 1.21 continue; 1.22 } 1.23 - assert sym.kind == Kinds.PCK; 1.24 + Assert.check(sym.kind == Kinds.PCK); 1.25 log.warning("proc.package.does.not.exist", nameStr); 1.26 pckSymbols = pckSymbols.prepend((PackageSymbol)sym); 1.27 } catch (CompletionFailure e) { 1.28 @@ -1086,8 +1086,8 @@ 1.29 if (c != this) 1.30 annotationProcessingOccurred = c.annotationProcessingOccurred = true; 1.31 // doProcessing will have handled deferred diagnostics 1.32 - assert c.log.deferDiagnostics == false; 1.33 - assert c.log.deferredDiagnostics.size() == 0; 1.34 + Assert.check(c.log.deferDiagnostics == false 1.35 + && c.log.deferredDiagnostics.size() == 0); 1.36 return c; 1.37 } finally { 1.38 procEnvImpl.close(); 1.39 @@ -1324,7 +1324,7 @@ 1.40 return; 1.41 List<JCTree> pdef = lower.translateTopLevelClass(env, env.tree, localMake); 1.42 if (pdef.head != null) { 1.43 - assert pdef.tail.isEmpty(); 1.44 + Assert.check(pdef.tail.isEmpty()); 1.45 results.add(new Pair<Env<AttrContext>, JCClassDecl>(env, (JCClassDecl)pdef.head)); 1.46 } 1.47 }