Cleanup unnecessary boxing
This commit is contained in:
committed by
Josh Cummings
parent
2055466ad7
commit
2306d987e9
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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")));
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user