Format with Eclipse Oxygen SR2

pull/11981/merge
Phillip Webb 7 years ago
parent 1f8bc391ce
commit 798522d890

@ -377,7 +377,7 @@ public class CrshAutoConfiguration {
BeanFactoryFilteringPluginDiscovery(ClassLoader classLoader,
ListableBeanFactory beanFactory, String[] disabledPlugins)
throws NullPointerException {
throws NullPointerException {
super(classLoader);
this.beanFactory = beanFactory;
this.disabledPlugins = disabledPlugins;

@ -98,7 +98,7 @@ final class MetricsFilter extends OncePerRequestFilter {
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
throws ServletException, IOException {
StopWatch stopWatch = createStopWatchIfNecessary(request);
String path = new UrlPathHelper().getPathWithinApplication(request);
int status = HttpStatus.INTERNAL_SERVER_ERROR.value();

@ -89,10 +89,9 @@ public class PublicMetricsAutoConfiguration {
@Bean
public MetricReaderPublicMetrics metricReaderPublicMetrics() {
return new MetricReaderPublicMetrics(
new CompositeMetricReader(this.metricReaders == null ? new MetricReader[0]
: this.metricReaders
.toArray(new MetricReader[this.metricReaders.size()])));
return new MetricReaderPublicMetrics(new CompositeMetricReader(
this.metricReaders == null ? new MetricReader[0] : this.metricReaders
.toArray(new MetricReader[this.metricReaders.size()])));
}
@Bean

@ -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() {

@ -76,7 +76,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
public void invoke(@RequestParam(defaultValue = "true") boolean live,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
throws IOException, ServletException {
if (!isEnabled()) {
response.setStatus(HttpStatus.NOT_FOUND.value());
return;
@ -100,7 +100,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
private void dumpHeap(boolean live, HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, InterruptedException {
throws IOException, ServletException, InterruptedException {
if (this.heapDumper == null) {
this.heapDumper = createHeapDumper();
}

@ -101,7 +101,7 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
throws ServletException, IOException {
long startTime = System.nanoTime();
Map<String, Object> trace = getTrace(request);
logTrace(request, trace);

@ -548,7 +548,7 @@ public class MetricFilterAutoConfigurationTests {
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
throws ServletException, IOException {
// send redirect before filter chain is executed, like Spring Security sending
// us back to a login page
response.sendRedirect("http://example.com");
@ -563,7 +563,7 @@ public class MetricFilterAutoConfigurationTests {
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
throws ServletException, IOException {
response.sendError(HttpStatus.SERVICE_UNAVAILABLE.value());
}

@ -306,7 +306,7 @@ public class EndpointMBeanExporterTests {
private ObjectName getObjectName(String domain, String beanKey,
boolean includeIdentity, ApplicationContext applicationContext)
throws MalformedObjectNameException {
throws MalformedObjectNameException {
if (includeIdentity) {
return ObjectNameManager.getInstance(String.format(
"%s:type=Endpoint,name=%s,identity=%s", domain, beanKey, ObjectUtils

@ -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\"")))

@ -124,7 +124,7 @@ public class BatchAutoConfiguration {
@ConditionalOnMissingBean(JobOperator.class)
public SimpleJobOperator jobOperator(JobExplorer jobExplorer, JobLauncher jobLauncher,
ListableJobLocator jobRegistry, JobRepository jobRepository)
throws Exception {
throws Exception {
SimpleJobOperator factory = new SimpleJobOperator();
factory.setJobExplorer(jobExplorer);
factory.setJobLauncher(jobLauncher);

@ -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);
}

@ -231,7 +231,7 @@ final class BeanTypeRegistry implements SmartInitializingSingleton {
private Class<?> doGetFactoryBeanGeneric(ConfigurableListableBeanFactory beanFactory,
BeanDefinition definition, String name)
throws Exception, ClassNotFoundException, LinkageError {
throws Exception, ClassNotFoundException, LinkageError {
if (StringUtils.hasLength(definition.getFactoryBeanName())
&& StringUtils.hasLength(definition.getFactoryMethodName())) {
return getConfigurationClassFactoryBeanGeneric(beanFactory, definition, name);

@ -165,7 +165,7 @@ class OnBeanCondition extends SpringBootCondition implements ConfigurationCondit
private Collection<String> getBeanNamesForType(ListableBeanFactory beanFactory,
String type, ClassLoader classLoader, boolean considerHierarchy)
throws LinkageError {
throws LinkageError {
try {
Set<String> result = new LinkedHashSet<String>();
collectBeanNamesForType(result, beanFactory,

@ -108,7 +108,7 @@ class OnPropertyCondition extends SpringBootCondition {
ConditionMessage.forCondition(ConditionalOnProperty.class, spec)
.found("different value in property",
"different value in properties")
.items(Style.QUOTE, nonMatchingProperties));
.items(Style.QUOTE, nonMatchingProperties));
}
return ConditionOutcome.match(ConditionMessage
.forCondition(ConditionalOnProperty.class, spec).because("matched"));

@ -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.

@ -229,7 +229,7 @@ public class RedisAutoConfiguration {
@ConditionalOnMissingBean(name = "redisTemplate")
public RedisTemplate<Object, Object> redisTemplate(
RedisConnectionFactory redisConnectionFactory)
throws UnknownHostException {
throws UnknownHostException {
RedisTemplate<Object, Object> template = new RedisTemplate<Object, Object>();
template.setConnectionFactory(redisConnectionFactory);
return template;
@ -239,7 +239,7 @@ public class RedisAutoConfiguration {
@ConditionalOnMissingBean(StringRedisTemplate.class)
public StringRedisTemplate stringRedisTemplate(
RedisConnectionFactory redisConnectionFactory)
throws UnknownHostException {
throws UnknownHostException {
StringRedisTemplate template = new StringRedisTemplate();
template.setConnectionFactory(redisConnectionFactory);
return template;

@ -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)");
}
}

@ -82,7 +82,7 @@ class ActiveMQConnectionFactoryFactory {
private <T extends ActiveMQConnectionFactory> T createConnectionFactoryInstance(
Class<T> factoryClass) throws InstantiationException, IllegalAccessException,
InvocationTargetException, NoSuchMethodException {
InvocationTargetException, NoSuchMethodException {
String brokerUrl = determineBrokerUrl();
String user = this.properties.getUser();
String password = this.properties.getPassword();

@ -47,7 +47,7 @@ class ArtemisXAConnectionFactoryConfiguration {
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
ArtemisProperties properties, XAConnectionFactoryWrapper wrapper)
throws Exception {
throws Exception {
return wrapper.wrapConnectionFactory(
new ArtemisConnectionFactoryFactory(beanFactory, properties)
.createConnectionFactory(ActiveMQXAConnectionFactory.class));

@ -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();
@ -300,7 +299,7 @@ public class WebMvcAutoConfiguration {
registry.addResourceHandler(staticPathPattern)
.addResourceLocations(
this.resourceProperties.getStaticLocations())
.setCachePeriod(cachePeriod));
.setCachePeriod(cachePeriod));
}
}

@ -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,

@ -492,7 +492,7 @@ public class JacksonAutoConfigurationTests {
@Override
public void serialize(Foo value, JsonGenerator jgen,
SerializerProvider provider)
throws IOException, JsonProcessingException {
throws IOException, JsonProcessingException {
jgen.writeStartObject();
jgen.writeStringField("foo", "bar");
jgen.writeEndObject();

@ -140,16 +140,15 @@ 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")
+ ","
+ ClassUtils.addResourcePathToPackagePath(getClass(),
"another.sql"),
"spring.datasource.data:" + ClassUtils
.addResourcePathToPackagePath(getClass(), "data.sql"));
EnvironmentTestUtils
.addEnvironment(this.context, "spring.datasource.initialize:true",
"spring.datasource.schema:" + ClassUtils
.addResourcePathToPackagePath(getClass(), "schema.sql")
+ ","
+ ClassUtils.addResourcePathToPackagePath(getClass(),
"another.sql"),
"spring.datasource.data:" + ClassUtils
.addResourcePathToPackagePath(getClass(), "data.sql"));
this.context.register(DataSourceAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();

@ -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);
}

@ -220,7 +220,7 @@ public class BasicErrorControllerIntegrationTests {
@Override
protected void renderMergedOutputModel(Map<String, Object> model,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
throws Exception {
response.getWriter().write("ERROR_BEAN");
}
};

@ -150,7 +150,7 @@ public class BasicErrorControllerMockMvcTests {
@Override
protected void renderMergedOutputModel(Map<String, Object> model,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
throws Exception {
response.getWriter().write("ERROR_BEAN");
}
};

@ -803,7 +803,7 @@ public class WebMvcAutoConfigurationTests {
@Override
protected void renderMergedOutputModel(Map<String, Object> model,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
throws Exception {
response.getOutputStream().write("Hello World".getBytes());
}
};

@ -185,7 +185,7 @@ abstract class ArchiveCommand extends OptionParsingCommand {
private void writeJar(File file, Class<?>[] compiledClasses,
List<MatchedResource> classpathEntries, List<URL> dependencies)
throws FileNotFoundException, IOException, URISyntaxException {
throws FileNotFoundException, IOException, URISyntaxException {
final List<Library> libraries;
JarWriter writer = new JarWriter(file);
try {

@ -89,7 +89,7 @@ public abstract class CompilerAutoConfiguration {
*/
public void apply(GroovyClassLoader loader, GroovyCompilerConfiguration configuration,
GeneratorContext generatorContext, SourceUnit source, ClassNode classNode)
throws CompilationFailedException {
throws CompilationFailedException {
}
}

@ -38,9 +38,8 @@ public class SpringSecurityCompilerAutoConfiguration extends CompilerAutoConfigu
@Override
public void applyDependencies(DependencyCustomizer dependencies) {
dependencies
.ifAnyMissingClasses(
"org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity")
dependencies.ifAnyMissingClasses(
"org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity")
.add("spring-boot-starter-security");
}

@ -53,7 +53,7 @@ public class SpringTestCompilerAutoConfiguration extends CompilerAutoConfigurati
@Override
public void apply(GroovyClassLoader loader, GroovyCompilerConfiguration configuration,
GeneratorContext generatorContext, SourceUnit source, ClassNode classNode)
throws CompilationFailedException {
throws CompilationFailedException {
if (!AstUtils.hasAtLeastOneAnnotation(classNode, "RunWith")) {
AnnotationNode runWith = new AnnotationNode(ClassHelper.make("RunWith"));
runWith.addMember("value",

@ -38,9 +38,8 @@ public class SpringWebsocketCompilerAutoConfiguration extends CompilerAutoConfig
@Override
public void applyDependencies(DependencyCustomizer dependencies) {
dependencies
.ifAnyMissingClasses(
"org.springframework.web.socket.config.annotation.EnableWebSocket")
dependencies.ifAnyMissingClasses(
"org.springframework.web.socket.config.annotation.EnableWebSocket")
.add("spring-boot-starter-websocket").add("spring-messaging");
}

@ -94,9 +94,8 @@ public class AetherGrapeEngine implements GrapeEngine {
private ProgressReporter getProgressReporter(DefaultRepositorySystemSession session,
boolean quiet) {
String progressReporter = (quiet ? "none"
: System.getProperty(
"org.springframework.boot.cli.compiler.grape.ProgressReporter"));
String progressReporter = (quiet ? "none" : System.getProperty(
"org.springframework.boot.cli.compiler.grape.ProgressReporter"));
if ("detail".equals(progressReporter)
|| Boolean.getBoolean("groovy.grape.report.downloads")) {
return new DetailedProgressReporter(session, System.out);

@ -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);

@ -49,12 +49,13 @@ public class TomcatLegacyCookieProcessorExample {
((TomcatEmbeddedServletContainerFactory) container)
.addContextCustomizers(new TomcatContextCustomizer() {
@Override
public void customize(Context context) {
context.setCookieProcessor(new LegacyCookieProcessor());
}
@Override
public void customize(Context context) {
context.setCookieProcessor(
new LegacyCookieProcessor());
}
});
});
}
}

@ -50,7 +50,7 @@ public class RestTemplateProxyCustomizationExample {
@Override
public HttpHost determineProxy(HttpHost target,
HttpRequest request, HttpContext context)
throws HttpException {
throws HttpException {
if (target.getHostName().equals("192.168.0.5")) {
return null;
}

@ -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)));
}

@ -93,7 +93,7 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
@SuppressWarnings("unchecked")
protected final boolean isTypeOrAnnotated(MetadataReader metadataReader,
MetadataReaderFactory metadataReaderFactory, Class<?> type)
throws IOException {
throws IOException {
AnnotationTypeFilter annotationFilter = new AnnotationTypeFilter(
(Class<? extends Annotation>) type);
AssignableTypeFilter typeFilter = new AssignableTypeFilter(type);

@ -53,7 +53,7 @@ public class ExampleJsonComponent {
@Override
protected ExampleCustomObject deserializeObject(JsonParser jsonParser,
DeserializationContext context, ObjectCodec codec, JsonNode tree)
throws IOException {
throws IOException {
return new ExampleCustomObject(
nullSafeValue(tree.get("value"), String.class));
}

@ -370,7 +370,7 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda
@Override
public PropertyValues postProcessPropertyValues(PropertyValues pvs,
PropertyDescriptor[] pds, final Object bean, String beanName)
throws BeansException {
throws BeansException {
ReflectionUtils.doWithFields(bean.getClass(), new FieldCallback() {
@Override

@ -492,7 +492,7 @@ public class TestRestTemplate {
*/
public <T> ResponseEntity<T> postForEntity(String url, Object request,
Class<T> responseType, Map<String, ?> urlVariables)
throws RestClientException {
throws RestClientException {
return this.restTemplate.postForEntity(url, request, responseType, urlVariables);
}
@ -735,7 +735,7 @@ public class TestRestTemplate {
*/
public <T> ResponseEntity<T> exchange(String url, HttpMethod method,
HttpEntity<?> requestEntity, Class<T> responseType, Object... urlVariables)
throws RestClientException {
throws RestClientException {
return this.restTemplate.exchange(url, method, requestEntity, responseType,
urlVariables);
}
@ -780,7 +780,7 @@ public class TestRestTemplate {
*/
public <T> ResponseEntity<T> exchange(URI url, HttpMethod method,
HttpEntity<?> requestEntity, Class<T> responseType)
throws RestClientException {
throws RestClientException {
return this.restTemplate.exchange(applyRootUriIfNecessary(url), method,
requestEntity, responseType);
}
@ -863,7 +863,7 @@ public class TestRestTemplate {
*/
public <T> ResponseEntity<T> exchange(URI url, HttpMethod method,
HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType)
throws RestClientException {
throws RestClientException {
return this.restTemplate.exchange(applyRootUriIfNecessary(url), method,
requestEntity, responseType);
}
@ -931,7 +931,7 @@ public class TestRestTemplate {
*/
public <T> T execute(String url, HttpMethod method, RequestCallback requestCallback,
ResponseExtractor<T> responseExtractor, Object... urlVariables)
throws RestClientException {
throws RestClientException {
return this.restTemplate.execute(url, method, requestCallback, responseExtractor,
urlVariables);
}
@ -955,7 +955,7 @@ public class TestRestTemplate {
*/
public <T> T execute(String url, HttpMethod method, RequestCallback requestCallback,
ResponseExtractor<T> responseExtractor, Map<String, ?> urlVariables)
throws RestClientException {
throws RestClientException {
return this.restTemplate.execute(url, method, requestCallback, responseExtractor,
urlVariables);
}

@ -255,7 +255,7 @@ public class TestRestTemplateTests {
testRestTemplate.exchange(
new RequestEntity<String>(HttpMethod.GET, relativeUri),
new ParameterizedTypeReference<String>() {
});
});
}
});
@ -286,7 +286,7 @@ public class TestRestTemplateTests {
testRestTemplate.exchange(relativeUri, HttpMethod.GET,
new HttpEntity<byte[]>(new byte[0]),
new ParameterizedTypeReference<String>() {
});
});
}
});

@ -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,18 +380,14 @@ 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)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(20));
assertThat(metadata)
.has(Metadata
.withProperty("nestedChildProps.parent-class-property",
Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(10));
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)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(10));
}
@Test

@ -61,7 +61,7 @@ public class JsonMarshallerTests {
new ItemHint.ValueProvider("first",
Collections.<String, Object>singletonMap("target",
"foo")),
new ItemHint.ValueProvider("second", null))));
new ItemHint.ValueProvider("second", null))));
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
JsonMarshaller marshaller = new JsonMarshaller();
marshaller.write(metadata, outputStream);

@ -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.

@ -273,7 +273,7 @@ public class Repackager {
private void repackage(JarFile sourceJar, JarWriter writer,
final List<Library> unpackLibraries, final List<Library> standardLibraries)
throws IOException {
throws IOException {
writer.writeManifest(buildManifest(sourceJar));
Set<String> seen = new HashSet<String>();
writeNestedLibraries(unpackLibraries, seen, writer);

@ -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);

@ -108,7 +108,7 @@ public class JarFile extends java.util.jar.JarFile {
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data, JarEntryFilter filter, JarFileType type)
throws IOException {
throws IOException {
super(rootFile.getFile());
this.rootFile = rootFile;
this.pathFromRoot = pathFromRoot;

@ -125,11 +125,9 @@ 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"))
.getUrl().toURI());
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.

@ -73,7 +73,7 @@ public abstract class JsonObjectDeserializer<T>
*/
protected abstract T deserializeObject(JsonParser jsonParser,
DeserializationContext context, ObjectCodec codec, JsonNode tree)
throws IOException;
throws IOException;
/**
* Helper method to extract a value from the given {@code jsonNode} or return

@ -50,7 +50,7 @@ public class ApplicationContextHeaderFilter extends OncePerRequestFilter {
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
throws ServletException, IOException {
response.addHeader(HEADER_NAME, this.applicationContext.getId());
filterChain.doFilter(request, response);
}

@ -86,7 +86,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
throws ServletException, IOException {
ErrorPageFilter.this.doFilter(request, response, chain);
}
@ -134,7 +134,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
private void handleErrorStatus(HttpServletRequest request,
HttpServletResponse response, int status, String message)
throws ServletException, IOException {
throws ServletException, IOException {
if (response.isCommitted()) {
handleCommittedResponse(request, null);
return;
@ -151,7 +151,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
private void handleException(HttpServletRequest request, HttpServletResponse response,
ErrorWrapperResponse wrapped, Throwable ex)
throws IOException, ServletException {
throws IOException, ServletException {
Class<?> type = ex.getClass();
String errorPath = getErrorPath(type);
if (errorPath == null) {
@ -168,7 +168,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
private void forwardToErrorPage(String path, HttpServletRequest request,
HttpServletResponse response, Throwable ex)
throws ServletException, IOException {
throws ServletException, IOException {
if (logger.isErrorEnabled()) {
String message = "Forwarding to error page from request "
+ getDescription(request) + " due to exception [" + ex.getMessage()

@ -1124,13 +1124,13 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
protected String getResponse(String url,
HttpComponentsClientHttpRequestFactory requestFactory, String... headers)
throws IOException, URISyntaxException {
throws IOException, URISyntaxException {
return getResponse(url, HttpMethod.GET, requestFactory, headers);
}
protected String getResponse(String url, HttpMethod method,
HttpComponentsClientHttpRequestFactory requestFactory, String... headers)
throws IOException, URISyntaxException {
throws IOException, URISyntaxException {
ClientHttpResponse response = getClientResponse(url, method, requestFactory,
headers);
try {
@ -1162,7 +1162,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
protected ClientHttpResponse getClientResponse(String url, HttpMethod method,
HttpComponentsClientHttpRequestFactory requestFactory, String... headers)
throws IOException, URISyntaxException {
throws IOException, URISyntaxException {
ClientHttpRequest request = requestFactory.createRequest(new URI(url), method);
request.getHeaders().add("Cookie", "JSESSIONID=" + "123");
for (String header : headers) {

@ -199,7 +199,7 @@ public class JsonObjectDeserializerTests {
@Override
protected T deserializeObject(JsonParser jsonParser,
DeserializationContext context, ObjectCodec codec, JsonNode tree)
throws IOException {
throws IOException {
return null;
}

@ -49,7 +49,7 @@ public class NameAndAgeJsonComponent {
@Override
protected NameAndAge deserializeObject(JsonParser jsonParser,
DeserializationContext context, ObjectCodec codec, JsonNode tree)
throws IOException {
throws IOException {
String name = nullSafeValue(tree.get("name"), String.class);
Integer age = nullSafeValue(tree.get("age"), Integer.class);
return new NameAndAge(name, age);

@ -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…
Cancel
Save