1
0
mirror of synced 2026-08-05 09:47:05 +00:00

Cleanup unnecessary unboxing

Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
This commit is contained in:
Lars Grefer
2019-08-01 23:30:53 +02:00
committed by Josh Cummings
parent 2306d987e9
commit 2056834432
16 changed files with 21 additions and 23 deletions
@@ -23,7 +23,7 @@ public final class ExpressionUtils {
public static boolean evaluateAsBoolean(Expression expr, EvaluationContext ctx) {
try {
return expr.getValue(ctx, Boolean.class).booleanValue();
return expr.getValue(ctx, Boolean.class);
}
catch (EvaluationException e) {
throw new IllegalArgumentException("Failed to evaluate expression '"
@@ -105,7 +105,7 @@ public class KeyBasedPersistenceTokenService implements TokenService, Initializi
long creationTime;
try {
creationTime = Long.decode(tokens[0]).longValue();
creationTime = Long.decode(tokens[0]);
}
catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Expected number but found " + tokens[0]);
@@ -144,7 +144,7 @@ public class KeyBasedPersistenceTokenService implements TokenService, Initializi
}
private String computeServerSecretApplicableAt(long time) {
return serverSecret + ":" + new Long(time % serverInteger.intValue()).intValue();
return serverSecret + ":" + new Long(time % serverInteger).intValue();
}
/**