Skip to content

Commit c1203e0

Browse files
author
Paul Holser
committed
Make FrameworkField ctor public. Fixes #1668
Prior to this change, custom runners could make `FrameworkMethod` instances, but not `FrameworkField` instances. This small change allows for both now, because `FrameworkField`'s constructor has been promoted to `public` from package-private.
1 parent c53a277 commit c1203e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
public class FrameworkField extends FrameworkMember<FrameworkField> {
1616
private final Field field;
1717

18+
/**
19+
* Returns a new {@code FrameworkField} for {@code field}.
20+
*
21+
* Access relaxed to {@code public} since version 4.14.
22+
*/
1823
FrameworkField(Field field) {
1924
if (field == null) {
2025
throw new NullPointerException(
@@ -26,7 +31,7 @@ public class FrameworkField extends FrameworkMember<FrameworkField> {
2631
// This field could be a public field in a package-scope base class
2732
try {
2833
field.setAccessible(true);
29-
} catch (SecurityException e) {
34+
} catch (SecurityException e) {
3035
// We may get an IllegalAccessException when we try to access the field
3136
}
3237
}

0 commit comments

Comments
 (0)