Skip to content

Commit

Permalink
For #1668, make FrameworkField ctor public
Browse files Browse the repository at this point in the history
Prior to this change, custom runners could make FrameworkMethod
instances, but not FrameworkField instances. This small change
allows for both now, because FrameworkFields constructor has been
promoted to public from package-private.
  • Loading branch information
Paul Holser committed Jul 15, 2020
1 parent bef3bca commit ff9ca34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/junit/runner/Version.java
Expand Up @@ -9,7 +9,7 @@ private Version() {
}

public static String id() {
return "4.13-SNAPSHOT";
return "4.14-SNAPSHOT";
}

public static void main(String[] args) {
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/junit/runners/model/FrameworkField.java
Expand Up @@ -2,7 +2,6 @@

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.List;

import org.junit.runners.BlockJUnit4ClassRunner;

Expand All @@ -15,7 +14,7 @@
public class FrameworkField extends FrameworkMember<FrameworkField> {
private final Field field;

FrameworkField(Field field) {
public FrameworkField(Field field) {
if (field == null) {
throw new NullPointerException(
"FrameworkField cannot be created without an underlying field.");
Expand All @@ -26,7 +25,7 @@ public class FrameworkField extends FrameworkMember<FrameworkField> {
// This field could be a public field in a package-scope base class
try {
field.setAccessible(true);
} catch (SecurityException e) {
} catch (SecurityException e) {
// We may get an IllegalAccessException when we try to access the field
}
}
Expand Down

0 comments on commit ff9ca34

Please sign in to comment.