Reformat code

pull/3605/merge
Phillip Webb 9 years ago
parent 0f6b60d8c8
commit 15686ed4fd

@ -338,7 +338,7 @@ public class CrshAutoConfiguration {
@Override
protected Iterable<PropertyDescriptor<?>> createConfigurationCapabilities() {
return Arrays.<PropertyDescriptor<?>> asList(ROLES);
return Arrays.<PropertyDescriptor<?>>asList(ROLES);
}
}
@ -458,7 +458,7 @@ public class CrshAutoConfiguration {
return Collections.singletonList(((FileHandle) handle).openStream())
.iterator();
}
return Collections.<InputStream> emptyList().iterator();
return Collections.<InputStream>emptyList().iterator();
}
@Override

@ -112,7 +112,7 @@ public class EndpointWebMvcChildContextConfiguration {
// the same place)
this.server.customize(container);
// Then reset the error pages
container.setErrorPages(Collections.<ErrorPage> emptySet());
container.setErrorPages(Collections.<ErrorPage>emptySet());
// and add the management-specific bits
container.setPort(this.managementServerProperties.getPort());
container.setAddress(this.managementServerProperties.getAddress());

@ -184,7 +184,7 @@ public class ConfigurationPropertiesReportEndpoint extends
return result;
}
catch (Exception ex) {
return new HashMap<String, Object>(Collections.<String, Object> singletonMap(
return new HashMap<String, Object>(Collections.<String, Object>singletonMap(
"error", "Cannot serialize '" + prefix + "'"));
}
}

@ -48,12 +48,12 @@ public class ShutdownEndpoint extends AbstractEndpoint<Map<String, Object>> impl
public Map<String, Object> invoke() {
if (this.context == null) {
return Collections.<String, Object> singletonMap("message",
return Collections.<String, Object>singletonMap("message",
"No context to shutdown.");
}
try {
return Collections.<String, Object> singletonMap("message",
return Collections.<String, Object>singletonMap("message",
"Shutting down, bye...");
}
finally {

@ -36,7 +36,7 @@ public class AuditListenerTests {
public void testStoredEvents() {
AuditEventRepository repository = mock(AuditEventRepository.class);
AuditEvent event = new AuditEvent("principal", "type",
Collections.<String, Object> emptyMap());
Collections.<String, Object>emptyMap());
AuditListener listener = new AuditListener(repository);
listener.onApplicationEvent(new AuditApplicationEvent(event));
verify(repository).add(event);

@ -171,7 +171,7 @@ public class EndpointAutoConfigurationTests {
@Override
public Collection<Metric<?>> metrics() {
Metric<Integer> metric = new Metric<Integer>("foo", 1);
return Collections.<Metric<?>> singleton(metric);
return Collections.<Metric<?>>singleton(metric);
}
};
}

@ -97,7 +97,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public void isSensitiveOverride() throws Exception {
this.context = new AnnotationConfigApplicationContext();
PropertySource<?> propertySource = new MapPropertySource("test",
Collections.<String, Object> singletonMap(this.property + ".sensitive",
Collections.<String, Object>singletonMap(this.property + ".sensitive",
String.valueOf(!this.sensitive)));
this.context.getEnvironment().getPropertySources().addFirst(propertySource);
this.context.register(this.configClass);
@ -114,7 +114,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public void isEnabledFallbackToEnvironment() throws Exception {
this.context = new AnnotationConfigApplicationContext();
PropertySource<?> propertySource = new MapPropertySource("test",
Collections.<String, Object> singletonMap(this.property + ".enabled",
Collections.<String, Object>singletonMap(this.property + ".enabled",
false));
this.context.getEnvironment().getPropertySources().addFirst(propertySource);
this.context.register(this.configClass);
@ -127,7 +127,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public void isExplicitlyEnabled() throws Exception {
this.context = new AnnotationConfigApplicationContext();
PropertySource<?> propertySource = new MapPropertySource("test",
Collections.<String, Object> singletonMap(this.property + ".enabled",
Collections.<String, Object>singletonMap(this.property + ".enabled",
false));
this.context.getEnvironment().getPropertySources().addFirst(propertySource);
this.context.register(this.configClass);
@ -140,7 +140,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public void isAllEndpointsDisabled() throws Exception {
this.context = new AnnotationConfigApplicationContext();
PropertySource<?> propertySource = new MapPropertySource("test",
Collections.<String, Object> singletonMap("endpoints.enabled", false));
Collections.<String, Object>singletonMap("endpoints.enabled", false));
this.context.getEnvironment().getPropertySources().addFirst(propertySource);
this.context.register(this.configClass);
this.context.refresh();

@ -106,7 +106,7 @@ public class MetricsEndpointTests extends AbstractEndpointTests<MetricsEndpoint>
PublicMetrics metrics = new PublicMetrics() {
@Override
public Collection<Metric<?>> metrics() {
return Collections.<Metric<?>> singleton(metric);
return Collections.<Metric<?>>singleton(metric);
}
};
return new MetricsEndpoint(metrics);

@ -53,7 +53,7 @@ public class RequestMappingEndpointTests {
mapping.setApplicationContext(new StaticApplicationContext());
mapping.initApplicationContext();
this.endpoint.setHandlerMappings(Collections
.<AbstractUrlHandlerMapping> singletonList(mapping));
.<AbstractUrlHandlerMapping>singletonList(mapping));
Map<String, Object> result = this.endpoint.invoke();
assertEquals(1, result.size());
@SuppressWarnings("unchecked")
@ -114,7 +114,7 @@ public class RequestMappingEndpointTests {
mapping.setApplicationContext(new StaticApplicationContext());
mapping.afterPropertiesSet();
this.endpoint.setMethodMappings(Collections
.<AbstractHandlerMethodMapping<?>> singletonList(mapping));
.<AbstractHandlerMethodMapping<?>>singletonList(mapping));
Map<String, Object> result = this.endpoint.invoke();
assertEquals(1, result.size());
assertTrue(result.keySet().iterator().next().contains("/dump"));

@ -53,7 +53,7 @@ public class TraceEndpointTests extends AbstractEndpointTests<TraceEndpoint> {
@Bean
public TraceEndpoint endpoint() {
TraceRepository repository = new InMemoryTraceRepository();
repository.add(Collections.<String, Object> singletonMap("a", "b"));
repository.add(Collections.<String, Object>singletonMap("a", "b"));
return new TraceEndpoint(repository);
}
}

@ -49,7 +49,7 @@ import static org.mockito.Mockito.mock;
public class HealthMvcEndpointTests {
private static final PropertySource<?> NON_SENSITIVE = new MapPropertySource("test",
Collections.<String, Object> singletonMap("endpoints.health.sensitive",
Collections.<String, Object>singletonMap("endpoints.health.sensitive",
"false"));
private HealthEndpoint endpoint = null;

@ -108,7 +108,7 @@ public class MetricsMvcEndpointTests {
@Override
public Collection<Metric<?>> metrics() {
return Arrays.<Metric<?>> asList(new Metric<Integer>("foo", 1));
return Arrays.<Metric<?>>asList(new Metric<Integer>("foo", 1));
}
});

@ -60,7 +60,7 @@ public class PrefixMetricGroupExporterTests {
@Test
public void multiMetricGroupsCopiedAsDefault() {
this.reader.set("foo", Arrays.<Metric<?>> asList(new Metric<Number>("bar", 2.3),
this.reader.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("bar", 2.3),
new Metric<Number>("spam", 1.3)));
this.exporter.export();
assertEquals(1, this.writer.countGroups());

@ -55,7 +55,7 @@ public class RedisMultiMetricRepositoryTests {
@Parameters
public static List<Object[]> parameters() {
return Arrays.<Object[]> asList(new Object[] { null }, new Object[] { "test" });
return Arrays.<Object[]>asList(new Object[] { null }, new Object[] { "test" });
}
@Before
@ -85,26 +85,26 @@ public class RedisMultiMetricRepositoryTests {
@Test
public void setAndGet() {
this.repository.set("foo",
Arrays.<Metric<?>> asList(new Metric<Number>("foo.bar", 12.3)));
Arrays.<Metric<?>>asList(new Metric<Number>("foo.bar", 12.3)));
this.repository.set("foo",
Arrays.<Metric<?>> asList(new Metric<Number>("foo.bar", 15.3)));
Arrays.<Metric<?>>asList(new Metric<Number>("foo.bar", 15.3)));
assertEquals(15.3, Iterables.collection(this.repository.findAll("foo"))
.iterator().next().getValue());
}
@Test
public void setAndGetMultiple() {
this.repository.set("foo", Arrays.<Metric<?>> asList(new Metric<Number>(
"foo.val", 12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("foo.val",
12.3), new Metric<Number>("foo.bar", 11.3)));
assertEquals(2, Iterables.collection(this.repository.findAll("foo")).size());
}
@Test
public void groups() {
this.repository.set("foo", Arrays.<Metric<?>> asList(new Metric<Number>(
"foo.val", 12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>> asList(new Metric<Number>(
"bar.val", 12.3), new Metric<Number>("bar.foo", 11.3)));
this.repository.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("foo.val",
12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>>asList(new Metric<Number>("bar.val",
12.3), new Metric<Number>("bar.foo", 11.3)));
Collection<String> groups = Iterables.collection(this.repository.groups());
assertEquals(2, groups.size());
assertTrue("Wrong groups: " + groups, groups.contains("foo"));
@ -112,10 +112,10 @@ public class RedisMultiMetricRepositoryTests {
@Test
public void count() {
this.repository.set("foo", Arrays.<Metric<?>> asList(new Metric<Number>(
"foo.val", 12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>> asList(new Metric<Number>(
"bar.val", 12.3), new Metric<Number>("bar.foo", 11.3)));
this.repository.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("foo.val",
12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>>asList(new Metric<Number>("bar.val",
12.3), new Metric<Number>("bar.foo", 11.3)));
assertEquals(2, this.repository.countGroups());
}

@ -36,7 +36,8 @@ import static org.junit.Assert.assertFalse;
public class DropwizardMetricWriterTests {
private final MetricRegistry registry = new MetricRegistry();
private final DropwizardMetricWriter writer = new DropwizardMetricWriter(this.registry);
private final DropwizardMetricWriter writer = new DropwizardMetricWriter(
this.registry);
@Test
public void incrementCounter() {

@ -49,7 +49,7 @@ public class AuthorizationAuditListenerTests {
@Test
public void testAuthenticationSuccess() {
this.listener.onApplicationEvent(new AuthorizationFailureEvent(this, Arrays
.<ConfigAttribute> asList(new SecurityConfig("USER")),
.<ConfigAttribute>asList(new SecurityConfig("USER")),
new UsernamePasswordAuthenticationToken("user", "password"),
new AccessDeniedException("Bad user")));
verify(this.publisher).publishEvent((ApplicationEvent) anyObject());

@ -35,9 +35,9 @@ public class InMemoryTraceRepositoryTests {
@Test
public void capacityLimited() {
this.repository.setCapacity(2);
this.repository.add(Collections.<String, Object> singletonMap("foo", "bar"));
this.repository.add(Collections.<String, Object> singletonMap("bar", "foo"));
this.repository.add(Collections.<String, Object> singletonMap("bar", "bar"));
this.repository.add(Collections.<String, Object>singletonMap("foo", "bar"));
this.repository.add(Collections.<String, Object>singletonMap("bar", "foo"));
this.repository.add(Collections.<String, Object>singletonMap("bar", "bar"));
List<Trace> traces = this.repository.findAll();
assertEquals(2, traces.size());
assertEquals("bar", traces.get(0).getInfo().get("bar"));
@ -48,9 +48,9 @@ public class InMemoryTraceRepositoryTests {
public void reverseFalse() {
this.repository.setReverse(false);
this.repository.setCapacity(2);
this.repository.add(Collections.<String, Object> singletonMap("foo", "bar"));
this.repository.add(Collections.<String, Object> singletonMap("bar", "foo"));
this.repository.add(Collections.<String, Object> singletonMap("bar", "bar"));
this.repository.add(Collections.<String, Object>singletonMap("foo", "bar"));
this.repository.add(Collections.<String, Object>singletonMap("bar", "foo"));
this.repository.add(Collections.<String, Object>singletonMap("bar", "bar"));
List<Trace> traces = this.repository.findAll();
assertEquals(2, traces.size());
assertEquals("bar", traces.get(1).getInfo().get("bar"));

@ -45,8 +45,7 @@ public class JacksonProperties {
/**
* Joda date time format string (yyyy-MM-dd HH:mm:ss). If not configured,
* "date-format" will be used as a fallback if it is configured with a format
* string.
* "date-format" will be used as a fallback if it is configured with a format string.
*/
private String jodaDateTimeFormat;

@ -86,7 +86,8 @@ enum DatabaseDriver {
/**
* SQL Server
*/
SQLSERVER("com.microsoft.sqlserver.jdbc.SQLServerDriver", "com.microsoft.sqlserver.jdbc.SQLServerXADataSource");
SQLSERVER("com.microsoft.sqlserver.jdbc.SQLServerDriver",
"com.microsoft.sqlserver.jdbc.SQLServerXADataSource");
private final String driverClassName;

@ -36,7 +36,7 @@ public class JndiPropertiesHidingClassLoader extends ClassLoader {
@Override
public Enumeration<URL> getResources(String name) throws IOException {
if ("jndi.properties".equals(name)) {
return Collections.enumeration(Collections.<URL> emptyList());
return Collections.enumeration(Collections.<URL>emptyList());
}
return super.getResources(name);
}

@ -109,7 +109,7 @@ public class MongoDataAutoConfigurationTests {
Set<Class> initialEntitySet = (Set<Class>) ReflectionTestUtils.getField(
mappingContext, "initialEntitySet");
assertThat(initialEntitySet, hasSize(types.length));
assertThat(initialEntitySet, Matchers.<Class> hasItems(types));
assertThat(initialEntitySet, Matchers.<Class>hasItems(types));
}
@Configuration

@ -58,7 +58,7 @@ public class HttpMessageConvertersTests {
for (HttpMessageConverter<?> converter : converters) {
converterClasses.add(converter.getClass());
}
assertThat(converterClasses, equalTo(Arrays.<Class<?>> asList(
assertThat(converterClasses, equalTo(Arrays.<Class<?>>asList(
ByteArrayHttpMessageConverter.class, StringHttpMessageConverter.class,
ResourceHttpMessageConverter.class, SourceHttpMessageConverter.class,
AllEncompassingFormHttpMessageConverter.class,
@ -117,7 +117,7 @@ public class HttpMessageConvertersTests {
for (HttpMessageConverter<?> converter : converters) {
converterClasses.add(converter.getClass());
}
assertThat(converterClasses, equalTo(Arrays.<Class<?>> asList(
assertThat(converterClasses, equalTo(Arrays.<Class<?>>asList(
ByteArrayHttpMessageConverter.class, StringHttpMessageConverter.class,
ResourceHttpMessageConverter.class, SourceHttpMessageConverter.class,
AllEncompassingFormHttpMessageConverter.class,

@ -38,7 +38,7 @@ import org.springframework.boot.cli.command.test.TestCommand;
*/
public class DefaultCommandFactory implements CommandFactory {
private static final List<Command> DEFAULT_COMMANDS = Arrays.<Command> asList(
private static final List<Command> DEFAULT_COMMANDS = Arrays.<Command>asList(
new VersionCommand(), new RunCommand(), new TestCommand(), new GrabCommand(),
new JarCommand(), new InstallCommand(), new UninstallCommand(),
new InitCommand());

@ -39,7 +39,7 @@ public abstract class GroovyTemplate {
public static String template(String name) throws IOException,
CompilationFailedException, ClassNotFoundException {
return template(name, Collections.<String, Object> emptyMap());
return template(name, Collections.<String, Object>emptyMap());
}
public static String template(String name, Map<String, ?> model) throws IOException,

@ -29,7 +29,7 @@ public class CustomCommandFactory implements CommandFactory {
@Override
public Collection<Command> getCommands() {
return Collections.<Command> singleton(new CustomCommand());
return Collections.<Command>singleton(new CustomCommand());
}
}

@ -81,7 +81,8 @@ public class CliTester implements TestRule {
try {
this.commands.add(future.get(this.timeout, TimeUnit.MILLISECONDS));
return getOutput();
} catch (Exception ex) {
}
catch (Exception ex) {
return getOutput();
}
}

@ -41,7 +41,7 @@ import static org.junit.Assert.assertEquals;
public class ProjectGenerationRequestTests {
public static final Map<String, String> EMPTY_TAGS = Collections
.<String, String> emptyMap();
.<String, String>emptyMap();
@Rule
public final ExpectedException thrown = ExpectedException.none();

@ -72,7 +72,7 @@ public class SampleAtmosphereApplication {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
onStartup(Collections.<Class<?>> emptySet(), servletContext);
onStartup(Collections.<Class<?>>emptySet(), servletContext);
}
}

@ -33,8 +33,7 @@ import org.springframework.boot.configurationprocessor.fieldvalues.javac.JavaCom
public interface FieldValuesParser {
/**
* Implementation of {@link FieldValuesParser} that always returns an empty
* result.
* Implementation of {@link FieldValuesParser} that always returns an empty result.
*/
public static final FieldValuesParser NONE = new FieldValuesParser() {

@ -16,7 +16,6 @@
package org.springframework.boot.configurationsample.simple;
/**
* This has no annotation on purpose to check that no meta-data is generated.
*

@ -42,7 +42,7 @@ public final class Dependency {
* @param version the version
*/
public Dependency(String groupId, String artifactId, String version) {
this(groupId, artifactId, version, Collections.<Exclusion> emptyList());
this(groupId, artifactId, version, Collections.<Exclusion>emptyList());
}
/**

@ -93,7 +93,7 @@ public abstract class ManagedDependencies implements Dependencies {
* @see #get(Collection)
*/
public static ManagedDependencies get() {
return get(Collections.<Dependencies> emptySet());
return get(Collections.<Dependencies>emptySet());
}
/**

@ -41,7 +41,7 @@ public class ManagedDependenciesDelegateTests {
PropertiesFileDependencies extra = new PropertiesFileDependencies(getClass()
.getResourceAsStream("additional-external.properties"));
this.dependencies = new ManagedDependenciesDelegate(root,
Collections.<Dependencies> singleton(extra));
Collections.<Dependencies>singleton(extra));
}
@Test

@ -138,8 +138,7 @@ public class PropertiesLauncherTests {
public void testCustomClassLoaderCreation() throws Exception {
System.setProperty("loader.classLoader", TestLoader.class.getName());
PropertiesLauncher launcher = new PropertiesLauncher();
ClassLoader loader = launcher
.createClassLoader(Collections.<Archive> emptyList());
ClassLoader loader = launcher.createClassLoader(Collections.<Archive>emptyList());
assertNotNull(loader);
assertEquals(TestLoader.class.getName(), loader.getClass().getName());
}

@ -42,7 +42,7 @@ public class DependencyFilterMojoTests {
@Test
public void filterDependencies() throws MojoExecutionException {
TestableDependencyFilterMojo mojo = new TestableDependencyFilterMojo(
Collections.<Exclude> emptyList(), "com.foo", "exclude-id");
Collections.<Exclude>emptyList(), "com.foo", "exclude-id");
Artifact artifact = createArtifact("com.bar", "one");
Set<Artifact> artifacts = mojo.filterDependencies(
@ -55,7 +55,7 @@ public class DependencyFilterMojoTests {
@Test
public void filterGroupIdExactMatch() throws MojoExecutionException {
TestableDependencyFilterMojo mojo = new TestableDependencyFilterMojo(
Collections.<Exclude> emptyList(), "com.foo", "");
Collections.<Exclude>emptyList(), "com.foo", "");
Artifact artifact = createArtifact("com.foo.bar", "one");
Set<Artifact> artifacts = mojo.filterDependencies(

@ -101,7 +101,7 @@ public class AtomikosDependsOnBeanFactoryPostProcessor implements
}
private List<String> asList(String[] array) {
return (array == null ? Collections.<String> emptyList() : Arrays.asList(array));
return (array == null ? Collections.<String>emptyList() : Arrays.asList(array));
}
@Override

@ -85,7 +85,7 @@ public class TestRestTemplate extends RestTemplate {
return;
}
List<ClientHttpRequestInterceptor> interceptors = Collections
.<ClientHttpRequestInterceptor> singletonList(new BasicAuthorizationInterceptor(
.<ClientHttpRequestInterceptor>singletonList(new BasicAuthorizationInterceptor(
username, password));
setRequestFactory(new InterceptingClientHttpRequestFactory(getRequestFactory(),
interceptors));

@ -77,7 +77,7 @@ public class ResourceBannerTests {
ResourceBanner banner = new MockResourceBanner(resource, bootVersion,
applicationVersion);
ConfigurableEnvironment environment = new MockEnvironment();
Map<String, Object> source = Collections.<String, Object> singletonMap("a", "1");
Map<String, Object> source = Collections.<String, Object>singletonMap("a", "1");
environment.getPropertySources().addLast(new MapPropertySource("map", source));
ByteArrayOutputStream out = new ByteArrayOutputStream();
banner.printBanner(environment, getClass(), new PrintStream(out));

@ -314,7 +314,7 @@ public class SpringApplicationTests {
ConfigurableEnvironment environment = new StandardEnvironment();
environment.getPropertySources().addFirst(
new MapPropertySource("commandLineArgs", Collections
.<String, Object> singletonMap("foo", "original")));
.<String, Object>singletonMap("foo", "original")));
application.setEnvironment(environment);
application.run("--foo=bar", "--bar=foo");
assertTrue(hasPropertySource(environment, CompositePropertySource.class,

@ -56,12 +56,12 @@ public class PropertySourcesPropertyValuesTests {
});
this.propertySources.addFirst(new MapPropertySource("map", Collections
.<String, Object> singletonMap("name", "${foo}")));
.<String, Object>singletonMap("name", "${foo}")));
}
@Test
public void testTypesPreserved() {
Map<String, Object> map = Collections.<String, Object> singletonMap("name", 123);
Map<String, Object> map = Collections.<String, Object>singletonMap("name", 123);
this.propertySources.replace("map", new MapPropertySource("map", map));
PropertySourcesPropertyValues propertyValues = new PropertySourcesPropertyValues(
this.propertySources);
@ -142,7 +142,7 @@ public class PropertySourcesPropertyValuesTests {
@Test
public void testOverriddenValue() {
this.propertySources.addFirst(new MapPropertySource("new", Collections
.<String, Object> singletonMap("name", "spam")));
.<String, Object>singletonMap("name", "spam")));
PropertySourcesPropertyValues propertyValues = new PropertySourcesPropertyValues(
this.propertySources);
assertEquals("spam", propertyValues.getPropertyValue("name").getValue());
@ -170,7 +170,7 @@ public class PropertySourcesPropertyValuesTests {
TestBean target = new TestBean();
DataBinder binder = new DataBinder(target);
this.propertySources.addFirst(new MapPropertySource("another", Collections
.<String, Object> singletonMap("something", "${nonexistent}")));
.<String, Object>singletonMap("something", "${nonexistent}")));
binder.bind(new PropertySourcesPropertyValues(this.propertySources));
assertEquals("bar", target.getName());
}

@ -75,7 +75,7 @@ public class SpringApplicationBuilderTests {
SpringApplicationBuilder application = new SpringApplicationBuilder()
.sources(ExampleConfig.class)
.contextClass(StaticApplicationContext.class)
.properties(Collections.<String, Object> singletonMap("bar", "foo"));
.properties(Collections.<String, Object>singletonMap("bar", "foo"));
this.context = application.run();
assertThat(this.context.getEnvironment().getProperty("bar"), is(equalTo("foo")));
}

@ -149,7 +149,7 @@ public class MockEmbeddedServletContainerFactory extends
}
});
given(this.servletContext.getAttributeNames()).willReturn(
MockEmbeddedServletContainer.<String> emptyEnumeration());
MockEmbeddedServletContainer.<String>emptyEnumeration());
given(this.servletContext.getNamedDispatcher("default")).willReturn(
mock(RequestDispatcher.class));
for (ServletContextInitializer initializer : this.initializers) {

@ -157,7 +157,7 @@ public class EnableConfigurationPropertiesTests {
public void testExceptionOnValidation() {
this.context.register(ExceptionIfInvalidTestConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context, "name:foo");
this.expected.expectCause(Matchers.<Throwable> instanceOf(BindException.class));
this.expected.expectCause(Matchers.<Throwable>instanceOf(BindException.class));
this.context.refresh();
}

Loading…
Cancel
Save