Permalink
Browse files

Implemented the changes proposed davidhart82

  • Loading branch information...
1 parent 0c458a8 commit ebb9d7f536a5b1be8364c6cb7367cac8c3849caa @nicobn committed Jun 21, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/org/junit/experimental/runners/Enclosed.java
View
6 src/main/java/org/junit/experimental/runners/Enclosed.java
@@ -30,10 +30,10 @@
* Only called reflectively. Do not use programmatically.
*/
public Enclosed(Class<?> klass, RunnerBuilder builder) throws Throwable {
- super(builder, klass, filterOutAbstractClasses(klass.getClasses()));
+ super(builder, klass, filterAbstractClasses(klass.getClasses()));
}
- private static Class<?>[] filterOutAbstractClasses(final Class<?>[] classes) {
+ private static Class<?>[] filterAbstractClasses(final Class<?>[] classes) {
final Set<Class<?>> filteredSet = new HashSet<Class<?>>();
for (final Class<?> clazz : classes) {
@@ -42,6 +42,6 @@ public Enclosed(Class<?> klass, RunnerBuilder builder) throws Throwable {
}
}
- return filteredSet.toArray(new Class<?>[] { });
+ return filteredSet.toArray(new Class<?>[filteredSet.size()]);
}
}

0 comments on commit ebb9d7f

Please sign in to comment.