8027020: [regression] java.lang.VerifyError: Bad type on operand stack
Reviewed-by: jlaskey, attila
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptLoader.java Tue Oct 22 17:52:37 2013 +0200
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptLoader.java Tue Oct 22 22:04:46 2013 +0530
@@ -52,24 +52,10 @@
@Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
checkPackageAccess(name);
- try {
- return super.loadClass(name, resolve);
- } catch (final ClassNotFoundException | SecurityException e) {
- // We'll get ClassNotFoundException for Nashorn 'struct' classes.
- // Also, we'll get SecurityException for jdk.nashorn.internal.*
- // classes. So, load these using to context's 'shared' loader.
- // All these classes start with "jdk.nashorn.internal." prefix.
- try {
- if (name.startsWith(NASHORN_PKG_PREFIX)) {
- return context.getSharedLoader().loadClass(name);
- }
- } catch (final ClassNotFoundException ignored) {
- //ignored
- }
-
- // throw the original exception from here
- throw e;
+ if (name.startsWith(NASHORN_PKG_PREFIX)) {
+ return context.getSharedLoader().loadClass(name);
}
+ return super.loadClass(name, resolve);
}
// package-private and private stuff below this point