Index: vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java =================================================================== --- vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java (revision 513616) +++ vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java (working copy) @@ -386,6 +386,11 @@ ProtectionDomain domain) throws ClassFormatError { checkInitialized(); + if (name.indexOf('/') != -1) { + throw new NoClassDefFoundError( + "The name is expected in binary (canonical) form," + + " therefore '/' symbols are not allowed: " + name); + } if (offset < 0 || len < 0 || offset + len > data.length) { throw new IndexOutOfBoundsException( "Either offset or len is outside of the data array"); @@ -404,11 +409,6 @@ throw new SecurityException( "It is not allowed to define classes inside the java.* package: " + name); } - if (name.indexOf('/') != -1) { - throw new NoClassDefFoundError( - "The name is expected in binary (canonical) form," - + " therefore '/' symbols are not allowed: " + name); - } int lastDot = name.lastIndexOf('.'); packageName = lastDot == -1 ? "" : name.substring(0, lastDot); certs = getCertificates(packageName, domain.getCodeSource());