Skip to content
Browse files

Varargs makes test slightly shorter.

  • Loading branch information...
1 parent 23e6e92 commit 65f717ed35a698239d4a75960b4f6de2f7cce225 @jglick committed Sep 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/test/java/org/junit/tests/experimental/max/DescriptionTest.java
View
4 src/test/java/org/junit/tests/experimental/max/DescriptionTest.java
@@ -75,7 +75,7 @@ public void sameNamesButDifferentUniqueIdAreNotEqual() throws Exception {
@Test
public void usesPassedInClassObject() throws Exception {
class URLClassLoader2 extends URLClassLoader {
- URLClassLoader2(URL[] urls) {
+ URLClassLoader2(URL... urls) {
super(urls);
}
@Override // just making public
@@ -84,7 +84,7 @@ public void usesPassedInClassObject() throws Exception {
}
}
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());
assertEquals(loader, clazz.getClassLoader());

0 comments on commit 65f717e

Please sign in to comment.
Something went wrong with that request. Please try again.