equal
deleted
inserted
replaced
203 static { |
203 static { |
204 synchronized (loaderTypes) { loaderTypes.add(ClassLoader.class); } |
204 synchronized (loaderTypes) { loaderTypes.add(ClassLoader.class); } |
205 } |
205 } |
206 |
206 |
207 /** |
207 /** |
208 * Registers the given class loader type as parallel capabale. |
208 * Registers the given class loader type as parallel capable. |
209 * Returns {@code true} is successfully registered; {@code false} if |
209 * Returns {@code true} is successfully registered; {@code false} if |
210 * loader's super class is not registered. |
210 * loader's super class is not registered. |
211 */ |
211 */ |
212 static boolean register(Class<? extends ClassLoader> c) { |
212 static boolean register(Class<? extends ClassLoader> c) { |
213 synchronized (loaderTypes) { |
213 synchronized (loaderTypes) { |
830 ProtectionDomain protectionDomain) |
830 ProtectionDomain protectionDomain) |
831 throws ClassFormatError |
831 throws ClassFormatError |
832 { |
832 { |
833 int len = b.remaining(); |
833 int len = b.remaining(); |
834 |
834 |
835 // Use byte[] if not a direct ByteBufer: |
835 // Use byte[] if not a direct ByteBuffer: |
836 if (!b.isDirect()) { |
836 if (!b.isDirect()) { |
837 if (b.hasArray()) { |
837 if (b.hasArray()) { |
838 return defineClass(name, b.array(), |
838 return defineClass(name, b.array(), |
839 b.position() + b.arrayOffset(), len, |
839 b.position() + b.arrayOffset(), len, |
840 protectionDomain); |
840 protectionDomain); |