Skip to content

Commit

Permalink
Add curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Oct 30, 2021
1 parent 5fbbb24 commit dd333fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
16 changes: 12 additions & 4 deletions checker/tests/calledmethods-lombok/CheckerFrameworkBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder z(
@org.checkerframework.checker.builder.qual.ReturnsReceiver
@java.lang.SuppressWarnings("all")
public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder name(final String name) {
if (this.names == null) this.names = new java.util.ArrayList<String>();
if (this.names == null) {
this.names = new java.util.ArrayList<String>();
}
this.names.add(name);
return this;
}
Expand All @@ -130,15 +132,19 @@ public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder names(
if (names == null) {
throw new java.lang.NullPointerException("names cannot be null");
}
if (this.names == null) this.names = new java.util.ArrayList<String>();
if (this.names == null) {
this.names = new java.util.ArrayList<String>();
}
this.names.addAll(names);
return this;
}

@org.checkerframework.checker.builder.qual.ReturnsReceiver
@java.lang.SuppressWarnings("all")
public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder clearNames() {
if (this.names != null) this.names.clear();
if (this.names != null) {
this.names.clear();
}
return this;
}

Expand All @@ -161,7 +167,9 @@ public CheckerFrameworkBuilder build(
java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.names));
}
int x$value = this.x$value;
if (!this.x$set) x$value = CheckerFrameworkBuilder.$default$x();
if (!this.x$set) {
x$value = CheckerFrameworkBuilder.$default$x();
}
return new CheckerFrameworkBuilder(x$value, this.y, this.z, names);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1675,8 +1675,11 @@ public static List<? extends ExpressionTree> caseTreeGetExpressions(CaseTree cas
// Need to suppress deprecation on JDK 12 and later:
@SuppressWarnings("deprecation")
ExpressionTree expression = caseTree.getExpression();
if (expression == null) return Collections.emptyList();
else return Collections.singletonList(expression);
if (expression == null) {
return Collections.emptyList();
} else {
return Collections.singletonList(expression);
}
}

/**
Expand Down

0 comments on commit dd333fc

Please sign in to comment.