--- a/langtools/src/share/classes/javax/tools/ToolProvider.java Mon Jan 10 14:57:59 2011 -0800
+++ b/langtools/src/share/classes/javax/tools/ToolProvider.java Mon Jan 10 15:08:31 2011 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -172,7 +172,7 @@
{
// try loading class directly, in case tool is on the bootclasspath
try {
- return enableAsserts(Class.forName(toolClassName, false, null));
+ return Class.forName(toolClassName, false, null);
} catch (ClassNotFoundException e) {
trace(FINE, e);
@@ -194,27 +194,10 @@
trace(FINE, urls[0].toString());
cl = URLClassLoader.newInstance(urls);
- cl.setPackageAssertionStatus("com.sun.tools.javac", true);
refToolClassLoader = new WeakReference<ClassLoader>(cl);
}
return Class.forName(toolClassName, false, cl);
}
-
}
-
- private static Class<?> enableAsserts(Class<?> cls) {
- try {
- ClassLoader loader = cls.getClassLoader();
- if (loader != null)
- loader.setPackageAssertionStatus("com.sun.tools.javac", true);
- else
- trace(FINE, "loader == null");
- } catch (SecurityException ex) {
- trace(FINE, ex);
- }
- return cls;
- }
-
-
}