Format with Eclipse Oxygen SR2
This commit is contained in:
parent
1f8bc391ce
commit
798522d890
|
@ -89,9 +89,8 @@ public class PublicMetricsAutoConfiguration {
|
|||
|
||||
@Bean
|
||||
public MetricReaderPublicMetrics metricReaderPublicMetrics() {
|
||||
return new MetricReaderPublicMetrics(
|
||||
new CompositeMetricReader(this.metricReaders == null ? new MetricReader[0]
|
||||
: this.metricReaders
|
||||
return new MetricReaderPublicMetrics(new CompositeMetricReader(
|
||||
this.metricReaders == null ? new MetricReader[0] : this.metricReaders
|
||||
.toArray(new MetricReader[this.metricReaders.size()])));
|
||||
}
|
||||
|
||||
|
|
|
@ -89,9 +89,8 @@ public class CloudFoundryActuatorAutoConfiguration {
|
|||
String cloudControllerUrl = environment.getProperty("vcap.application.cf_api");
|
||||
boolean skipSslValidation = cloudFoundryProperties
|
||||
.getProperty("skip-ssl-validation", Boolean.class, false);
|
||||
return cloudControllerUrl == null ? null
|
||||
: new CloudFoundrySecurityService(restTemplateBuilder, cloudControllerUrl,
|
||||
skipSslValidation);
|
||||
return cloudControllerUrl == null ? null : new CloudFoundrySecurityService(
|
||||
restTemplateBuilder, cloudControllerUrl, skipSslValidation);
|
||||
}
|
||||
|
||||
private CorsConfiguration getCorsConfiguration() {
|
||||
|
|
|
@ -104,8 +104,8 @@ public class AuditEventsMvcEndpointTests {
|
|||
|
||||
@Test
|
||||
public void invokeFilterByPrincipalAndDateAfter() throws Exception {
|
||||
this.mvc.perform(get("/auditevents").param("principal", "user").param("after",
|
||||
"2016-11-01T10:00:00+0000"))
|
||||
this.mvc.perform(get("/auditevents")
|
||||
.param("principal", "user").param("after", "2016-11-01T10:00:00+0000"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().string(
|
||||
containsString("\"principal\":\"user\",\"type\":\"login\"")))
|
||||
|
|
|
@ -69,7 +69,8 @@ public enum CacheType {
|
|||
/**
|
||||
* Guava backed caching.
|
||||
*/
|
||||
@Deprecated GUAVA,
|
||||
@Deprecated
|
||||
GUAVA,
|
||||
|
||||
/**
|
||||
* Simple in-memory caching.
|
||||
|
|
|
@ -60,9 +60,8 @@ public class CouchbaseCacheConfiguration {
|
|||
public CouchbaseCacheManager cacheManager() {
|
||||
List<String> cacheNames = this.cacheProperties.getCacheNames();
|
||||
CouchbaseCacheManager cacheManager = new CouchbaseCacheManager(
|
||||
CacheBuilder.newInstance(this.bucket)
|
||||
.withExpiration(this.cacheProperties.getCouchbase()
|
||||
.getExpirationSeconds()),
|
||||
CacheBuilder.newInstance(this.bucket).withExpiration(
|
||||
this.cacheProperties.getCouchbase().getExpirationSeconds()),
|
||||
cacheNames.toArray(new String[cacheNames.size()]));
|
||||
return this.customizers.customize(cacheManager);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ public enum SearchStrategy {
|
|||
* Search all parents and ancestors, but not the current context.
|
||||
* @deprecated as of 1.5 in favor of {@link SearchStrategy#ANCESTORS}
|
||||
*/
|
||||
@Deprecated PARENTS,
|
||||
@Deprecated
|
||||
PARENTS,
|
||||
|
||||
/**
|
||||
* Search all ancestors, but not the current context.
|
||||
|
|
|
@ -109,9 +109,8 @@ public class FlywayAutoConfiguration {
|
|||
Assert.state(!this.properties.getLocations().isEmpty(),
|
||||
"Migration script locations not configured");
|
||||
boolean exists = hasAtLeastOneLocation();
|
||||
Assert.state(exists,
|
||||
"Cannot find migrations location in: " + this.properties
|
||||
.getLocations()
|
||||
Assert.state(exists, "Cannot find migrations location in: "
|
||||
+ this.properties.getLocations()
|
||||
+ " (please add migrations or check your Flyway configuration)");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ class EnableOAuth2SsoCondition extends SpringBootCondition {
|
|||
for (String name : enablers) {
|
||||
if (context.getBeanFactory().isTypeMatch(name,
|
||||
WebSecurityConfigurerAdapter.class)) {
|
||||
return ConditionOutcome.match(message
|
||||
.found("@EnableOAuth2Sso annotation on WebSecurityConfigurerAdapter")
|
||||
return ConditionOutcome.match(message.found(
|
||||
"@EnableOAuth2Sso annotation on WebSecurityConfigurerAdapter")
|
||||
.items(name));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -288,10 +288,9 @@ public class WebMvcAutoConfiguration {
|
|||
}
|
||||
Integer cachePeriod = this.resourceProperties.getCachePeriod();
|
||||
if (!registry.hasMappingForPattern("/webjars/**")) {
|
||||
customizeResourceHandlerRegistration(
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations(
|
||||
"classpath:/META-INF/resources/webjars/")
|
||||
customizeResourceHandlerRegistration(registry
|
||||
.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/")
|
||||
.setCachePeriod(cachePeriod));
|
||||
}
|
||||
String staticPathPattern = this.mvcProperties.getStaticPathPattern();
|
||||
|
|
|
@ -194,15 +194,17 @@ public class NoSuchBeanDefinitionFailureAnalyzerTests {
|
|||
}
|
||||
|
||||
private void assertActionMissingType(FailureAnalysis analysis, Class<?> type) {
|
||||
assertThat(analysis.getAction()).startsWith(String
|
||||
.format("Consider revisiting the conditions above or defining a bean of type '%s' "
|
||||
+ "in your configuration.", type.getName()));
|
||||
assertThat(analysis.getAction()).startsWith(String.format(
|
||||
"Consider revisiting the conditions above or defining a bean of type '%s' "
|
||||
+ "in your configuration.",
|
||||
type.getName()));
|
||||
}
|
||||
|
||||
private void assertActionMissingName(FailureAnalysis analysis, String name) {
|
||||
assertThat(analysis.getAction()).startsWith(String
|
||||
.format("Consider revisiting the conditions above or defining a bean named '%s' "
|
||||
+ "in your configuration.", name));
|
||||
assertThat(analysis.getAction()).startsWith(String.format(
|
||||
"Consider revisiting the conditions above or defining a bean named '%s' "
|
||||
+ "in your configuration.",
|
||||
name));
|
||||
}
|
||||
|
||||
private void assertBeanMethodDisabled(FailureAnalysis analysis, String description,
|
||||
|
|
|
@ -140,11 +140,10 @@ public class DataSourceInitializerTests {
|
|||
|
||||
@Test
|
||||
public void testDataSourceInitializedWithMultipleScripts() throws Exception {
|
||||
EnvironmentTestUtils.addEnvironment(this.context,
|
||||
"spring.datasource.initialize:true",
|
||||
"spring.datasource.schema:"
|
||||
+ ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
"schema.sql")
|
||||
EnvironmentTestUtils
|
||||
.addEnvironment(this.context, "spring.datasource.initialize:true",
|
||||
"spring.datasource.schema:" + ClassUtils
|
||||
.addResourcePathToPackagePath(getClass(), "schema.sql")
|
||||
+ ","
|
||||
+ ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
"another.sql"),
|
||||
|
|
|
@ -104,8 +104,10 @@ public class SecurityAutoConfigurationTests {
|
|||
ServerPropertiesAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertThat(this.context.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class).getOrder()).isEqualTo(
|
||||
assertThat(this.context
|
||||
.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class)
|
||||
.getOrder()).isEqualTo(
|
||||
FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER - 100);
|
||||
}
|
||||
|
||||
|
@ -134,8 +136,10 @@ public class SecurityAutoConfigurationTests {
|
|||
ServerPropertiesAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertThat(this.context.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class).getOrder()).isEqualTo(
|
||||
assertThat(this.context
|
||||
.getBean("securityFilterChainRegistration",
|
||||
DelegatingFilterProxyRegistrationBean.class)
|
||||
.getOrder()).isEqualTo(
|
||||
FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER - 100);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,8 +38,7 @@ public class SpringSecurityCompilerAutoConfiguration extends CompilerAutoConfigu
|
|||
|
||||
@Override
|
||||
public void applyDependencies(DependencyCustomizer dependencies) {
|
||||
dependencies
|
||||
.ifAnyMissingClasses(
|
||||
dependencies.ifAnyMissingClasses(
|
||||
"org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity")
|
||||
.add("spring-boot-starter-security");
|
||||
}
|
||||
|
|
|
@ -38,8 +38,7 @@ public class SpringWebsocketCompilerAutoConfiguration extends CompilerAutoConfig
|
|||
|
||||
@Override
|
||||
public void applyDependencies(DependencyCustomizer dependencies) {
|
||||
dependencies
|
||||
.ifAnyMissingClasses(
|
||||
dependencies.ifAnyMissingClasses(
|
||||
"org.springframework.web.socket.config.annotation.EnableWebSocket")
|
||||
.add("spring-boot-starter-websocket").add("spring-messaging");
|
||||
}
|
||||
|
|
|
@ -94,8 +94,7 @@ public class AetherGrapeEngine implements GrapeEngine {
|
|||
|
||||
private ProgressReporter getProgressReporter(DefaultRepositorySystemSession session,
|
||||
boolean quiet) {
|
||||
String progressReporter = (quiet ? "none"
|
||||
: System.getProperty(
|
||||
String progressReporter = (quiet ? "none" : System.getProperty(
|
||||
"org.springframework.boot.cli.compiler.grape.ProgressReporter"));
|
||||
if ("detail".equals(progressReporter)
|
||||
|| Boolean.getBoolean("groovy.grape.report.downloads")) {
|
||||
|
|
|
@ -105,9 +105,8 @@ public class DependencyResolutionContext {
|
|||
aetherDependency);
|
||||
}
|
||||
this.dependencyManagement = this.dependencyManagement == null
|
||||
? dependencyManagement
|
||||
: new CompositeDependencyManagement(dependencyManagement,
|
||||
this.dependencyManagement);
|
||||
? dependencyManagement : new CompositeDependencyManagement(
|
||||
dependencyManagement, this.dependencyManagement);
|
||||
this.artifactCoordinatesResolver = new DependencyManagementArtifactCoordinatesResolver(
|
||||
this.dependencyManagement);
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ public abstract class GroovyTemplate {
|
|||
}
|
||||
|
||||
public static String template(TemplateEngine engine, String name,
|
||||
Map<String, ?> model) throws IOException, CompilationFailedException,
|
||||
ClassNotFoundException {
|
||||
Map<String, ?> model)
|
||||
throws IOException, CompilationFailedException, ClassNotFoundException {
|
||||
Writable writable = getTemplate(engine, name).make(model);
|
||||
StringWriter result = new StringWriter();
|
||||
writable.writeTo(result);
|
||||
|
|
|
@ -51,7 +51,8 @@ public class TomcatLegacyCookieProcessorExample {
|
|||
|
||||
@Override
|
||||
public void customize(Context context) {
|
||||
context.setCookieProcessor(new LegacyCookieProcessor());
|
||||
context.setCookieProcessor(
|
||||
new LegacyCookieProcessor());
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -68,8 +68,8 @@ public class SampleDataRestApplicationTests {
|
|||
@Test
|
||||
public void findByNameAndCountry() throws Exception {
|
||||
|
||||
this.mvc.perform(
|
||||
get("/api/cities/search/findByNameAndCountryAllIgnoringCase?name=Melbourne&country=Australia"))
|
||||
this.mvc.perform(get(
|
||||
"/api/cities/search/findByNameAndCountryAllIgnoringCase?name=Melbourne&country=Australia"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("state", equalTo("Victoria")))
|
||||
.andExpect(jsonPath("name", equalTo("Melbourne")));
|
||||
|
@ -78,8 +78,8 @@ public class SampleDataRestApplicationTests {
|
|||
@Test
|
||||
public void findByContaining() throws Exception {
|
||||
|
||||
this.mvc.perform(
|
||||
get("/api/cities/search/findByNameContainingAndCountryContainingAllIgnoringCase?name=&country=UK"))
|
||||
this.mvc.perform(get(
|
||||
"/api/cities/search/findByNameContainingAndCountryContainingAllIgnoringCase?name=&country=UK"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("_embedded.cities", hasSize(3)));
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ import java.util.List;
|
|||
* Each stringer may be used to encode a single top level value. Instances of this class
|
||||
* are not thread safe. Although this class is nonfinal, it was not designed for
|
||||
* inheritance and should not be subclassed. In particular, self-use by overrideable
|
||||
* methods is not specified. See <i>Effective Java</i> Item 17,
|
||||
* "Design and Document or inheritance or else prohibit it" for further information.
|
||||
* methods is not specified. See <i>Effective Java</i> Item 17, "Design and Document or
|
||||
* inheritance or else prohibit it" for further information.
|
||||
*/
|
||||
public class JSONStringer {
|
||||
|
||||
|
|
|
@ -54,8 +54,8 @@ package org.springframework.boot.configurationprocessor.json;
|
|||
* Each tokener may be used to parse a single JSON string. Instances of this class are not
|
||||
* thread safe. Although this class is nonfinal, it was not designed for inheritance and
|
||||
* should not be subclassed. In particular, self-use by overrideable methods is not
|
||||
* specified. See <i>Effective Java</i> Item 17,
|
||||
* "Design and Document or inheritance or else prohibit it" for further information.
|
||||
* specified. See <i>Effective Java</i> Item 17, "Design and Document or inheritance or
|
||||
* else prohibit it" for further information.
|
||||
*/
|
||||
public class JSONTokener {
|
||||
|
||||
|
|
|
@ -380,16 +380,12 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
|||
ConfigurationMetadata metadata = compile(ClassWithNestedProperties.class);
|
||||
assertThat(metadata).has(Metadata.withGroup("nestedChildProps")
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class));
|
||||
assertThat(metadata)
|
||||
.has(Metadata
|
||||
.withProperty("nestedChildProps.child-class-property",
|
||||
Integer.class)
|
||||
assertThat(metadata).has(Metadata
|
||||
.withProperty("nestedChildProps.child-class-property", Integer.class)
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
|
||||
.withDefaultValue(20));
|
||||
assertThat(metadata)
|
||||
.has(Metadata
|
||||
.withProperty("nestedChildProps.parent-class-property",
|
||||
Integer.class)
|
||||
assertThat(metadata).has(Metadata
|
||||
.withProperty("nestedChildProps.parent-class-property", Integer.class)
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
|
||||
.withDefaultValue(10));
|
||||
}
|
||||
|
|
|
@ -320,7 +320,8 @@ public class SpringBootPluginExtension {
|
|||
* Module Layout.
|
||||
* @deprecated as of 1.5 in favor of a custom {@link LayoutFactory}
|
||||
*/
|
||||
@Deprecated MODULE(new Layouts.Module()),
|
||||
@Deprecated
|
||||
MODULE(new Layouts.Module()),
|
||||
|
||||
/**
|
||||
* No layout.
|
||||
|
|
|
@ -64,8 +64,8 @@ public class RandomAccessDataFile implements RandomAccessData {
|
|||
throw new IllegalArgumentException("File must not be null");
|
||||
}
|
||||
if (!file.exists()) {
|
||||
throw new IllegalArgumentException(String.format(
|
||||
"File %s must exist", file.getAbsolutePath()));
|
||||
throw new IllegalArgumentException(
|
||||
String.format("File %s must exist", file.getAbsolutePath()));
|
||||
}
|
||||
this.file = file;
|
||||
this.filePool = new FilePool(file, concurrentReads);
|
||||
|
|
|
@ -125,10 +125,8 @@ public class JarFileArchiveTests {
|
|||
File nested = new File(this.archive
|
||||
.getNestedArchive(getEntriesMap(this.archive).get("nested.jar")).getUrl()
|
||||
.toURI());
|
||||
File anotherNested = new File(
|
||||
this.archive
|
||||
.getNestedArchive(
|
||||
getEntriesMap(this.archive).get("another-nested.jar"))
|
||||
File anotherNested = new File(this.archive
|
||||
.getNestedArchive(getEntriesMap(this.archive).get("another-nested.jar"))
|
||||
.getUrl().toURI());
|
||||
assertThat(nested.getParent()).isEqualTo(anotherNested.getParent());
|
||||
}
|
||||
|
|
|
@ -355,7 +355,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
|
|||
* Module Layout.
|
||||
* @deprecated as of 1.5 in favor of a custom {@link LayoutFactory}
|
||||
*/
|
||||
@Deprecated MODULE(new Layouts.Module()),
|
||||
@Deprecated
|
||||
MODULE(new Layouts.Module()),
|
||||
|
||||
/**
|
||||
* No Layout.
|
||||
|
|
|
@ -30,9 +30,8 @@ public class TestServlet extends HttpServlet {
|
|||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
resp.getWriter()
|
||||
.print(((String) req.getServletContext()
|
||||
.getAttribute("listenerAttribute")) + " "
|
||||
resp.getWriter().print(
|
||||
((String) req.getServletContext().getAttribute("listenerAttribute")) + " "
|
||||
+ req.getAttribute("filterAttribute"));
|
||||
resp.getWriter().flush();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue