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

Use curly braces for if statements #5034

Merged
merged 1 commit into from
Jan 31, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ public DisbarUseTest(List<File> testFiles) {
@Parameters
public static String[] getTestDirs() {
// Check for JDK 16+ without using a library:
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])\\..*"))
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])\\..*")) {
return new String[] {"disbaruse-records"};
else return new String[] {};
} else {
return new String[] {};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ public LockTest(List<File> testFiles) {
@Parameters
public static String[] getTestDirs() {
// Check for JDK 16+ without using a library:
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])\\..*"))
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])\\..*")) {
return new String[] {"lock", "lock-records", "all-systems"};
else return new String[] {"lock", "all-systems"};
} else {
return new String[] {"lock", "all-systems"};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ public NullnessRecordsTest(List<File> testFiles) {
public static String[] getTestDirs() {
// Check for JDK 16+ without using a library:
// There is no decimal point in the JDK 17 version number.
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])"))
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])")) {
return new String[] {"nullness-records"};
else return new String[] {};
} else {
return new String[] {};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ public StubparserRecordTest(List<File> testFiles) {
public static String[] getTestDirs() {
// Check for JDK 16+ without using a library:
// There is no decimal point in the JDK 17 version number.
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])"))
if (System.getProperty("java.version").matches("^(1[6-9]|[2-9][0-9])")) {
return new String[] {"stubparser-records"};
else return new String[] {};
} else {
return new String[] {};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,9 @@ public void injectRecordComponentType(
// if there is no accessor in the stubs file:
RecordComponentStub recordComponentStub =
recordComponentType.componentsByName.get(elt.getSimpleName().toString());
if (recordComponentStub != null && !recordComponentStub.hasAccessorInStubs())
if (recordComponentStub != null && !recordComponentStub.hasAccessorInStubs()) {
replaceAnnotations(memberType.getReturnType(), recordComponentStub.type);
}
}
}
} else if (elt.getKind() == ElementKind.CONSTRUCTOR) {
Expand Down