Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FrameworkField ctor public. Fixes #1668 #1669

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/junit/runner/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ private Version() {
}

public static String id() {
return "4.13-SNAPSHOT";
return "4.14-SNAPSHOT";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind moving this change it's own commit (before the other changes)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! Done.

}

public static void main(String[] args) {
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/org/junit/runners/model/FrameworkField.java
Original file line number Diff line number Diff line change
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) {
pholser marked this conversation as resolved.
Show resolved Hide resolved
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