Skip to content

Commit 906a9f7

Browse files
committed
Polishing
1 parent 6fed3a0 commit 906a9f7

File tree

2 files changed

+9
-9
lines changed
  • spring-core/src/main/java/org/springframework/util
  • spring-expression/src/main/java/org/springframework/expression/spel/standard

2 files changed

+9
-9
lines changed

spring-core/src/main/java/org/springframework/util/ClassUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ public static Method getStaticMethod(Class<?> clazz, String methodName, Class<?>
14271427
Assert.notNull(methodName, "Method name must not be null");
14281428
try {
14291429
Method method = clazz.getMethod(methodName, args);
1430-
return Modifier.isStatic(method.getModifiers()) ? method : null;
1430+
return (Modifier.isStatic(method.getModifiers()) ? method : null);
14311431
}
14321432
catch (NoSuchMethodException ex) {
14331433
return null;

spring-expression/src/main/java/org/springframework/expression/spel/standard/Token.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -65,7 +65,7 @@ public boolean isIdentifier() {
6565

6666
public boolean isNumericRelationalOperator() {
6767
return (this.kind == TokenKind.GT || this.kind == TokenKind.GE || this.kind == TokenKind.LT ||
68-
this.kind == TokenKind.LE || this.kind==TokenKind.EQ || this.kind==TokenKind.NE);
68+
this.kind == TokenKind.LE || this.kind == TokenKind.EQ || this.kind == TokenKind.NE);
6969
}
7070

7171
public String stringValue() {
@@ -87,14 +87,14 @@ public Token asBetweenToken() {
8787

8888
@Override
8989
public String toString() {
90-
StringBuilder s = new StringBuilder();
91-
s.append('[').append(this.kind.toString());
90+
StringBuilder sb = new StringBuilder();
91+
sb.append('[').append(this.kind);
9292
if (this.kind.hasPayload()) {
93-
s.append(':').append(this.data);
93+
sb.append(':').append(this.data);
9494
}
95-
s.append(']');
96-
s.append('(').append(this.startPos).append(',').append(this.endPos).append(')');
97-
return s.toString();
95+
sb.append(']');
96+
sb.append('(').append(this.startPos).append(',').append(this.endPos).append(')');
97+
return sb.toString();
9898
}
9999

100100
}

0 commit comments

Comments
 (0)