Replace isEqualTo(null) with isNull()
This commit is contained in:
parent
4de3d0b860
commit
68878a1675
|
@ -154,11 +154,11 @@ public class EhCacheBasedAclCacheTests {
|
|||
|
||||
Object retrieved1 = FieldUtils.getProtectedFieldValue("aclAuthorizationStrategy",
|
||||
retrieved);
|
||||
assertThat(retrieved1).isEqualTo(null);
|
||||
assertThat(retrieved1).isNull();
|
||||
|
||||
Object retrieved2 = FieldUtils.getProtectedFieldValue(
|
||||
"permissionGrantingStrategy", retrieved);
|
||||
assertThat(retrieved2).isEqualTo(null);
|
||||
assertThat(retrieved2).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -353,7 +353,7 @@ public class CasAuthenticationProviderTests {
|
|||
assertThat(cap.supports(TestingAuthenticationToken.class)).isFalse();
|
||||
|
||||
// Try it anyway
|
||||
assertThat(cap.authenticate(token)).isEqualTo(null);
|
||||
assertThat(cap.authenticate(token)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -370,7 +370,7 @@ public class CasAuthenticationProviderTests {
|
|||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(
|
||||
"some_normal_user", "password",
|
||||
AuthorityUtils.createAuthorityList("ROLE_A"));
|
||||
assertThat(cap.authenticate(token)).isEqualTo(null);
|
||||
assertThat(cap.authenticate(token)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -108,7 +108,7 @@ public class FilterChainProxyConfigTests {
|
|||
public void pathWithNoMatchHasNoFilters() throws Exception {
|
||||
FilterChainProxy filterChainProxy = appCtx.getBean(
|
||||
"newFilterChainProxyNoDefaultPath", FilterChainProxy.class);
|
||||
assertThat(filterChainProxy.getFilters("/nomatch")).isEqualTo(null);
|
||||
assertThat(filterChainProxy.getFilters("/nomatch")).isNull();
|
||||
}
|
||||
|
||||
// SEC-1235
|
||||
|
|
|
@ -52,7 +52,7 @@ public class RunAsManagerImplTests {
|
|||
|
||||
Authentication resultingToken = runAs.buildRunAs(inputToken, new Object(),
|
||||
SecurityConfig.createList("SOMETHING_WE_IGNORE"));
|
||||
assertThat(resultingToken).isEqualTo(null);
|
||||
assertThat(resultingToken).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -103,7 +103,7 @@ public class SecurityContextLoginModuleTests {
|
|||
this.module.login();
|
||||
assertThat(this.module.logout()).as("Should return true as it succeeds").isTrue();
|
||||
assertThat(this.module.getAuthentication()).as("Authentication should be null")
|
||||
.isEqualTo(null);
|
||||
.isNull();
|
||||
|
||||
assertThat(this.subject.getPrincipals().contains(this.auth))
|
||||
.withFailMessage(
|
||||
|
|
|
@ -99,6 +99,6 @@ public class ClaimAccessorTests {
|
|||
String claimName = "claim-with-null-value";
|
||||
this.claims.put(claimName, null);
|
||||
|
||||
assertThat(this.claimAccessor.getClaimAsString(claimName)).isEqualTo(null);
|
||||
assertThat(this.claimAccessor.getClaimAsString(claimName)).isNull();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ public class OpenIDAuthenticationProviderTests {
|
|||
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(
|
||||
USERNAME, "password");
|
||||
assertThat(provider.authenticate(token)).isEqualTo(null);
|
||||
assertThat(provider.authenticate(token)).isNull();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -101,7 +101,7 @@ public class AuthenticationTagTests {
|
|||
authenticationTag.setProperty("principal");
|
||||
assertThat(authenticationTag.doStartTag()).isEqualTo(Tag.SKIP_BODY);
|
||||
assertThat(authenticationTag.doEndTag()).isEqualTo(Tag.EVAL_PAGE);
|
||||
assertThat(authenticationTag.getLastMessage()).isEqualTo(null);
|
||||
assertThat(authenticationTag.getLastMessage()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -108,7 +108,7 @@ public class SimpleUrlAuthenticationSuccessHandlerTests {
|
|||
SimpleUrlAuthenticationSuccessHandler ash = new SimpleUrlAuthenticationSuccessHandler();
|
||||
ash.setTargetUrlParameter("targetUrl");
|
||||
ash.setTargetUrlParameter(null);
|
||||
assertThat(ash.getTargetUrlParameter()).isEqualTo(null);
|
||||
assertThat(ash.getTargetUrlParameter()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -147,7 +147,7 @@ public class AbstractPreAuthenticatedProcessingFilterTests {
|
|||
filter.doFilter(new MockHttpServletRequest(), new MockHttpServletResponse(),
|
||||
new MockFilterChain());
|
||||
|
||||
assertThat(SecurityContextHolder.getContext().getAuthentication()).isEqualTo(null);
|
||||
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue