Skip to content

Commit 714019f

Browse files
authored
Merge pull request #1669 from pholser/issues/1668/make-framework-field-ctor-public
Make FrameworkField constructor public. Fixes #1668
2 parents bef3bca + 5be301c commit 714019f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: src/main/java/junit/runner/Version.java

+1-1
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) {

Diff for: src/main/java/org/junit/runners/model/FrameworkField.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
public class FrameworkField extends FrameworkMember<FrameworkField> {
1616
private final Field field;
1717

18-
FrameworkField(Field field) {
18+
/**
19+
* Returns a new {@code FrameworkField} for {@code field}.
20+
*
21+
* <p>Access relaxed to {@code public} since version 4.14.
22+
*/
23+
public FrameworkField(Field field) {
1924
if (field == null) {
2025
throw new NullPointerException(
2126
"FrameworkField cannot be created without an underlying field.");
@@ -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)