1
0
mirror of synced 2026-08-07 10:47:49 +00:00

Cleanup unnecessary boxing

This commit is contained in:
Lars Grefer
2019-08-01 23:27:18 +02:00
committed by Josh Cummings
parent 2055466ad7
commit 2306d987e9
40 changed files with 158 additions and 159 deletions
@@ -29,7 +29,7 @@ public class TargetObject implements ITargetObject {
// ========================================================================================================
public Integer computeHashCode(String input) {
return Integer.valueOf(input.hashCode());
return input.hashCode();
}
public int countLength(String input) {
@@ -76,7 +76,7 @@ public class SecurityConfigTests {
MockConfigAttribute mock2 = new MockConfigAttribute("NOT_EQUAL");
assertThat(security1).isNotEqualTo(mock2);
Integer int1 = Integer.valueOf(987);
Integer int1 = 987;
assertThat(security1).isNotEqualTo(int1);
}
@@ -103,7 +103,7 @@ public class AfterInvocationProviderManagerTests {
List list = new Vector();
list.add(new MockAfterInvocationProvider("swap1", MethodInvocation.class,
new SecurityConfig("GIVE_ME_SWAP1")));
list.add(Integer.valueOf(45));
list.add(45);
list.add(new MockAfterInvocationProvider("swap3", MethodInvocation.class,
new SecurityConfig("GIVE_ME_SWAP3")));
@@ -111,7 +111,7 @@ public class AbstractAuthenticationTokenTests {
assertThat(!token1.equals(token7)).isTrue();
assertThat(!token7.equals(token1)).isTrue();
assertThat(!token1.equals(Integer.valueOf(100))).isTrue();
assertThat(!token1.equals(100)).isTrue();
}
@Test
@@ -42,7 +42,7 @@ public class SimpleGrantedAuthorityTests {
assertThat(auth1.equals(mock(GrantedAuthority.class))).isFalse();
assertThat(auth1.equals(Integer.valueOf(222))).isFalse();
assertThat(auth1.equals(222)).isFalse();
}
@Test
@@ -38,7 +38,7 @@ public class KeyBasedPersistenceTokenServiceTests {
SecureRandomFactoryBean fb = new SecureRandomFactoryBean();
KeyBasedPersistenceTokenService service = new KeyBasedPersistenceTokenService();
service.setServerSecret("MY:SECRET$$$#");
service.setServerInteger(Integer.valueOf(454545));
service.setServerInteger(454545);
try {
SecureRandom rnd = fb.getObject();
service.setSecureRandom(rnd);