Skip to content

Commit

Permalink
Merge pull request #1669 from pholser/issues/1668/make-framework-fiel…
Browse files Browse the repository at this point in the history
…d-ctor-public

Make FrameworkField constructor public.

Fixes #1668
  • Loading branch information
kcooney committed Aug 2, 2020
2 parents bef3bca + 5be301c commit 714019f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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
9 changes: 7 additions & 2 deletions src/main/java/org/junit/runners/model/FrameworkField.java
Expand Up @@ -15,7 +15,12 @@
public class FrameworkField extends FrameworkMember<FrameworkField> {
private final Field field;

FrameworkField(Field field) {
/**
* Returns a new {@code FrameworkField} for {@code field}.
*
* <p>Access relaxed to {@code public} since version 4.14.
*/
public FrameworkField(Field field) {
if (field == null) {
throw new NullPointerException(
"FrameworkField cannot be created without an underlying field.");
Expand All @@ -26,7 +31,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 714019f

Please sign in to comment.