Skip to content

Commit

Permalink
Varargs makes test slightly shorter.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Sep 6, 2012
1 parent 23e6e92 commit 65f717e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -75,7 +75,7 @@ public void sameNamesButDifferentUniqueIdAreNotEqual() throws Exception {
@Test @Test
public void usesPassedInClassObject() throws Exception { public void usesPassedInClassObject() throws Exception {
class URLClassLoader2 extends URLClassLoader { class URLClassLoader2 extends URLClassLoader {
URLClassLoader2(URL[] urls) { URLClassLoader2(URL... urls) {
super(urls); super(urls);
} }
@Override // just making public @Override // just making public
Expand All @@ -84,7 +84,7 @@ public Class<?> findClass(String name) throws ClassNotFoundException {
} }
} }
URL classpath= Sweet.class.getProtectionDomain().getCodeSource().getLocation(); URL classpath= Sweet.class.getProtectionDomain().getCodeSource().getLocation();
URLClassLoader2 loader= new URLClassLoader2(new URL[] {classpath}); URLClassLoader2 loader= new URLClassLoader2(classpath);
Class<?> clazz= loader.findClass(Sweet.class.getName()); Class<?> clazz= loader.findClass(Sweet.class.getName());
assertEquals(loader, clazz.getClassLoader()); assertEquals(loader, clazz.getClassLoader());


Expand Down

0 comments on commit 65f717e

Please sign in to comment.