diff --git a/core/src/main/java/org/springframework/security/core/token/KeyBasedPersistenceTokenService.java b/core/src/main/java/org/springframework/security/core/token/KeyBasedPersistenceTokenService.java index 3e2b2ef82a..4896e9d4b3 100644 --- a/core/src/main/java/org/springframework/security/core/token/KeyBasedPersistenceTokenService.java +++ b/core/src/main/java/org/springframework/security/core/token/KeyBasedPersistenceTokenService.java @@ -83,7 +83,7 @@ public class KeyBasedPersistenceTokenService implements TokenService, Initializi long creationTime = new Date().getTime(); String serverSecret = computeServerSecretApplicableAt(creationTime); String pseudoRandomNumber = generatePseudoRandomNumber(); - String content = Long.toString(creationTime) + ":" + pseudoRandomNumber + ":" + String content = creationTime + ":" + pseudoRandomNumber + ":" + extendedInformation; // Compute key @@ -126,7 +126,7 @@ public class KeyBasedPersistenceTokenService implements TokenService, Initializi String sha1Hex = tokens[tokens.length - 1]; // Verification - String content = Long.toString(creationTime) + ":" + pseudoRandomNumber + ":" + String content = creationTime + ":" + pseudoRandomNumber + ":" + extendedInfo.toString(); String expectedSha512Hex = Sha512DigestUtils.shaHex(content + ":" + serverSecret); Assert.isTrue(expectedSha512Hex.equals(sha1Hex), "Key verification failure"); diff --git a/itest/context/src/integration-test/java/org/springframework/security/performance/FilterChainPerformanceTests.java b/itest/context/src/integration-test/java/org/springframework/security/performance/FilterChainPerformanceTests.java index 4b8a4af500..9155ef1794 100644 --- a/itest/context/src/integration-test/java/org/springframework/security/performance/FilterChainPerformanceTests.java +++ b/itest/context/src/integration-test/java/org/springframework/security/performance/FilterChainPerformanceTests.java @@ -127,7 +127,7 @@ public class FilterChainPerformanceTests { HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY, SecurityContextHolder.getContext()); SecurityContextHolder.clearContext(); - sw.start(Integer.toString(nAuthorities) + " authorities"); + sw.start(nAuthorities + " authorities"); runWithStack(minimalStack); System.out.println(sw.shortSummary()); sw.stop(); diff --git a/web/src/main/java/org/springframework/security/web/util/RedirectUrlBuilder.java b/web/src/main/java/org/springframework/security/web/util/RedirectUrlBuilder.java index 17c237bc41..c7bb7bc2e1 100644 --- a/web/src/main/java/org/springframework/security/web/util/RedirectUrlBuilder.java +++ b/web/src/main/java/org/springframework/security/web/util/RedirectUrlBuilder.java @@ -75,7 +75,7 @@ public class RedirectUrlBuilder { // Append the port number if it's not standard for the scheme if (port != (scheme.equals("http") ? 80 : 443)) { - sb.append(":").append(Integer.toString(port)); + sb.append(":").append(port); } if (contextPath != null) {