Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implemented the changes proposed davidhart82

  • Loading branch information...
commit ebb9d7f536a5b1be8364c6cb7367cac8c3849caa 1 parent 0c458a8
Nick Berard authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/org/junit/experimental/runners/Enclosed.java
6 src/main/java/org/junit/experimental/runners/Enclosed.java
View
@@ -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()]);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.