automated code format cleanup

pull/888/head
Justin Richer 2015-08-05 10:21:21 -04:00
parent edda0218e1
commit 489450b1c2
117 changed files with 1023 additions and 1020 deletions

View File

@ -62,6 +62,7 @@ public class JWTBearerClientAssertionTokenEndpointFilter extends AbstractAuthent
public void afterPropertiesSet() { public void afterPropertiesSet() {
super.afterPropertiesSet(); super.afterPropertiesSet();
setAuthenticationFailureHandler(new AuthenticationFailureHandler() { setAuthenticationFailureHandler(new AuthenticationFailureHandler() {
@Override
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
AuthenticationException exception) throws IOException, ServletException { AuthenticationException exception) throws IOException, ServletException {
if (exception instanceof BadCredentialsException) { if (exception instanceof BadCredentialsException) {
@ -71,6 +72,7 @@ public class JWTBearerClientAssertionTokenEndpointFilter extends AbstractAuthent
} }
}); });
setAuthenticationSuccessHandler(new AuthenticationSuccessHandler() { setAuthenticationSuccessHandler(new AuthenticationSuccessHandler() {
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException, ServletException { Authentication authentication) throws IOException, ServletException {
// no-op - just allow filter chain to continue to token endpoint // no-op - just allow filter chain to continue to token endpoint

View File

@ -42,6 +42,7 @@ public class MultiUrlRequestMatcher implements RequestMatcher {
this.filterProcessesUrls = ImmutableSet.copyOf(filterProcessesUrls); this.filterProcessesUrls = ImmutableSet.copyOf(filterProcessesUrls);
} }
@Override
public boolean matches(HttpServletRequest request) { public boolean matches(HttpServletRequest request) {
String uri = request.getRequestURI(); String uri = request.getRequestURI();
int pathParamIndex = uri.indexOf(';'); int pathParamIndex = uri.indexOf(';');

View File

@ -29,8 +29,8 @@ import org.mitre.uma.model.ResourceSet;
import org.mitre.uma.repository.PermissionRepository; import org.mitre.uma.repository.PermissionRepository;
import org.mockito.AdditionalAnswers; import org.mockito.AdditionalAnswers;
import org.mockito.InjectMocks; import org.mockito.InjectMocks;
import org.mockito.Matchers;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock; import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner; import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.stubbing.Answer; import org.mockito.stubbing.Answer;
@ -94,7 +94,7 @@ public class TestDefaultPermissionService {
rs2.setScopes(scopes2); rs2.setScopes(scopes2);
// have the repository just pass the argument through // have the repository just pass the argument through
when(permissionRepository.save(Mockito.any(PermissionTicket.class))).then(AdditionalAnswers.returnsFirstArg()); when(permissionRepository.save(Matchers.any(PermissionTicket.class))).then(AdditionalAnswers.returnsFirstArg());
when(scopeService.scopesMatch(anySetOf(String.class), anySetOf(String.class))).then(new Answer<Boolean>() { when(scopeService.scopesMatch(anySetOf(String.class), anySetOf(String.class))).then(new Answer<Boolean>() {