Reformat code

This commit is contained in:
Phillip Webb
2015-09-08 14:56:40 -07:00
parent 2615990ffb
commit 67402405db
56 changed files with 188 additions and 252 deletions

View File

@@ -42,7 +42,7 @@ public class DataSourcePoolMetadataProviders implements DataSourcePoolMetadataPr
public DataSourcePoolMetadataProviders(
Collection<? extends DataSourcePoolMetadataProvider> providers) {
this.providers = (providers == null ? Collections
.<DataSourcePoolMetadataProvider> emptyList()
.<DataSourcePoolMetadataProvider>emptyList()
: new ArrayList<DataSourcePoolMetadataProvider>(providers));
}

View File

@@ -200,8 +200,8 @@ public class MongoProperties {
/**
* Creates a {@link MongoClient} using the given {@code options} and
* {@code environment}. If the configured port is zero, the value of the
* {@code local.mongo.port} property retrieved from the {@code environment} is used
* to configure the client.
* {@code local.mongo.port} property retrieved from the {@code environment} is used to
* configure the client.
*
* @param options the options
* @param environment the environment

View File

@@ -206,8 +206,7 @@ public class EmbeddedMongoAutoConfiguration {
private ToStringFriendlyFeatureAwareVersion(String version, Set<Feature> features) {
Assert.notNull(version, "version must not be null");
this.version = version;
this.features = features == null ? Collections.<Feature> emptySet()
: features;
this.features = features == null ? Collections.<Feature>emptySet() : features;
}
@Override

View File

@@ -113,7 +113,7 @@ public class OAuth2AuthorizationServerConfiguration extends
"password", "client_credentials", "implicit", "refresh_token"));
details.setAuthorities(AuthorityUtils
.commaSeparatedStringToAuthorityList("ROLE_USER"));
details.setRegisteredRedirectUri(Collections.<String> emptySet());
details.setRegisteredRedirectUri(Collections.<String>emptySet());
return details;
}

View File

@@ -114,7 +114,7 @@ public class ResourceServerTokenServicesConfiguration {
}
OAuth2RestTemplate template = getTemplate();
template.setInterceptors(Arrays
.<ClientHttpRequestInterceptor> asList(new AcceptJsonRequestInterceptor()));
.<ClientHttpRequestInterceptor>asList(new AcceptJsonRequestInterceptor()));
AuthorizationCodeAccessTokenProvider accessTokenProvider = new AuthorizationCodeAccessTokenProvider();
accessTokenProvider.setTokenRequestEnhancer(new AcceptJsonRequestEnhancer());
template.setAccessTokenProvider(accessTokenProvider);

View File

@@ -125,7 +125,7 @@ public class UserInfoTokenServices implements ResourceServerTokenServices {
catch (Exception ex) {
this.logger.info("Could not fetch user details: " + ex.getClass() + ", "
+ ex.getMessage());
return Collections.<String, Object> singletonMap("error",
return Collections.<String, Object>singletonMap("error",
"Could not fetch user details");
}
}

View File

@@ -49,8 +49,7 @@ public class WebMvcProperties {
private String dateFormat;
/**
* If the content of the "default" model should be ignored during redirect
* scenarios.
* If the content of the "default" model should be ignored during redirect scenarios.
*/
private boolean ignoreDefaultModelOnRedirect = true;

View File

@@ -35,8 +35,8 @@ import static org.junit.Assert.assertEquals;
*
* @author Dave Syer
*/
@SpringApplicationConfiguration({ Config.class,
MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
@SpringApplicationConfiguration({ Config.class, MessageSourceAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
@RunWith(SpringJUnit4ClassRunner.class)
@IntegrationTest("spring.messages.basename:test/messages")
public class MessageSourceAutoConfigurationIntegrationTests {

View File

@@ -35,8 +35,8 @@ import static org.junit.Assert.assertEquals;
*
* @author Dave Syer
*/
@SpringApplicationConfiguration({ Config.class,
MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
@SpringApplicationConfiguration({ Config.class, MessageSourceAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles("switch-messages")
public class MessageSourceAutoConfigurationProfileTests {

View File

@@ -615,8 +615,8 @@ public class CacheAutoConfigurationTests {
@Bean
public javax.cache.CacheManager customJCacheCacheManager() {
javax.cache.CacheManager cacheManager = mock(javax.cache.CacheManager.class);
when(cacheManager.getCacheNames()).thenReturn(
Collections.<String> emptyList());
when(cacheManager.getCacheNames())
.thenReturn(Collections.<String>emptyList());
return cacheManager;
}

View File

@@ -81,7 +81,7 @@ public class UserInfoTokenServicesTests {
this.services.setRestTemplate(this.template);
given(this.template.getForEntity(any(String.class), any(Class.class))).willThrow(
new UserRedirectRequiredException("foo:bar", Collections
.<String, String> emptyMap()));
.<String, String>emptyMap()));
this.expected.expect(InvalidTokenException.class);
assertEquals("unknown", this.services.loadAuthentication("FOO").getName());
}