Skip to content

Commit ff9ca34

Browse files
author
Paul Holser
committed
For #1668, make FrameworkField ctor public
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.
1 parent bef3bca commit ff9ca34

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/main/java/junit/runner/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ private Version() {
99
}
1010

1111
public static String id() {
12-
return "4.13-SNAPSHOT";
12+
return "4.14-SNAPSHOT";
1313
}
1414

1515
public static void main(String[] args) {

src/main/java/org/junit/runners/model/FrameworkField.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import java.lang.annotation.Annotation;
44
import java.lang.reflect.Field;
5-
import java.util.List;
65

76
import org.junit.runners.BlockJUnit4ClassRunner;
87

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

18-
FrameworkField(Field field) {
17+
public FrameworkField(Field field) {
1918
if (field == null) {
2019
throw new NullPointerException(
2120
"FrameworkField cannot be created without an underlying field.");
@@ -26,7 +25,7 @@ public class FrameworkField extends FrameworkMember<FrameworkField> {
2625
// This field could be a public field in a package-scope base class
2726
try {
2827
field.setAccessible(true);
29-
} catch (SecurityException e) {
28+
} catch (SecurityException e) {
3029
// We may get an IllegalAccessException when we try to access the field
3130
}
3231
}

0 commit comments

Comments
 (0)