Skip to content

Commit 994bbec

Browse files
committed
Polishing
1 parent afb378a commit 994bbec

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ public static Method getStaticMethod(Class<?> clazz, String methodName, Class<?>
14101410
Assert.notNull(methodName, "Method name must not be null");
14111411
try {
14121412
Method method = clazz.getMethod(methodName, args);
1413-
return Modifier.isStatic(method.getModifiers()) ? method : null;
1413+
return (Modifier.isStatic(method.getModifiers()) ? method : null);
14141414
}
14151415
catch (NoSuchMethodException ex) {
14161416
return null;

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

+8-8
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)