Skip to content

Commit

Permalink
Use curly braces for if statements (typetools#5034)
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored and wmdietl committed Feb 1, 2022
1 parent 96ab685 commit f4375d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ 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[] {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,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

0 comments on commit f4375d4

Please sign in to comment.