Skip to content

Commit

Permalink
refactor: Move @Nullable method annotations to the return type
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider and TeamModerne committed Jul 16, 2024
1 parent f006b2b commit 99ac760
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,7 @@ public J getTruePart() {
}

@Override
@Nullable
public J getFalsePart() {
public @Nullable J getFalsePart() {
return ifStatement.getElsePart();
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ private String labelDescription(J j) {
return label + " (" + tag + ')';
}

@Nullable
private static String labelTag(J j) {
private static @Nullable String labelTag(J j) {
if (j instanceof J.Binary) {
J.Binary binary = (J.Binary) j;
switch (binary.getOperator()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ static boolean matches(JavaType parameter, String parameterSignature) {
.equals(parameterSignature);
}

@Nullable
static String typePattern(JavaType type) {
static @Nullable String typePattern(JavaType type) {
if (type instanceof JavaType.Primitive) {
if (type.equals(JavaType.Primitive.String)) {
return ((JavaType.Primitive) type).getClassName();
Expand Down

0 comments on commit 99ac760

Please sign in to comment.