From 1e4f8fdd8ef9652dad837075f41176b4ffb95d30 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 14 Nov 2015 09:04:52 +0900 Subject: [PATCH] Polish --- .../boot/cli/TestCommandIntegrationTests.java | 4 ++-- .../devtools/livereload/LiveReloadServerTests.java | 4 ++-- ...onWarningsApplicationContextInitializerTests.java | 2 +- ...AbstractEmbeddedServletContainerFactoryTests.java | 6 +++--- .../AbstractFilterRegistrationBeanTests.java | 10 +++++----- .../undertow/FileSessionPersistenceTests.java | 2 +- .../boot/context/web/ErrorPageFilterTests.java | 12 ++++++------ .../boot/json/AbstractJsonParserTests.java | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java index 3614f5fd3a..38b0813149 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java @@ -42,12 +42,12 @@ public class TestCommandIntegrationTests { public CliTester cli = new CliTester("test-samples/"); @Before - public void setup() throws Exception { + public void setUp() throws Exception { System.setProperty("disableSpringSnapshotRepos", "false"); } @After - public void teardown() { + public void tearDown() { System.clearProperty("disableSpringSnapshotRepos"); } diff --git a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java index 08842a81b3..5f01ff96de 100644 --- a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java +++ b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java @@ -63,13 +63,13 @@ public class LiveReloadServerTests { private MonitoredLiveReloadServer server; @Before - public void setup() throws Exception { + public void setUp() throws Exception { this.server = new MonitoredLiveReloadServer(this.port); this.server.start(); } @After - public void teardown() throws Exception { + public void tearDown() throws Exception { this.server.stop(); } diff --git a/spring-boot/src/test/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializerTests.java b/spring-boot/src/test/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializerTests.java index 19f12cf3f2..6a80801b79 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializerTests.java @@ -66,7 +66,7 @@ public class ConfigurationWarningsApplicationContextInitializerTests { } @Test - public void noLogWithoutComponetScanAnnotation() throws Exception { + public void noLogWithoutComponentScanAnnotation() throws Exception { load(InDefaultPackageWithoutScanConfiguration.class); assertThat(this.output.toString(), not(containsString(SCAN_WARNING))); } diff --git a/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java b/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java index 7fc2b120d3..6a82814358 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java @@ -118,7 +118,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests { private final HttpClientContext httpClientContext = HttpClientContext.create(); @After - public void teardown() { + public void tearDown() { if (this.container != null) { try { this.container.stop(); @@ -866,13 +866,13 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests { private final AtomicBoolean requested = new AtomicBoolean(false); @Override - public InputStream create(InputStream instream) throws IOException { + public InputStream create(InputStream in) throws IOException { if (this.requested.get()) { throw new IllegalStateException( "On deflated InputStream already requested"); } this.requested.set(true); - return new GZIPInputStream(instream); + return new GZIPInputStream(in); } public boolean wasCompressionUsed() { diff --git a/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractFilterRegistrationBeanTests.java b/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractFilterRegistrationBeanTests.java index 5121bbb64a..29100f86c3 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractFilterRegistrationBeanTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractFilterRegistrationBeanTests.java @@ -87,8 +87,8 @@ public abstract class AbstractFilterRegistrationBeanTests { bean.setServletNames(new LinkedHashSet(Arrays.asList("s1", "s2"))); bean.addServletNames("s3"); bean.setServletRegistrationBeans( - Collections.singleton(mockServletRegistation("s4"))); - bean.addServletRegistrationBeans(mockServletRegistation("s5")); + Collections.singleton(mockServletRegistration("s4"))); + bean.addServletRegistrationBeans(mockServletRegistration("s5")); bean.setMatchAfter(true); bean.onStartup(this.servletContext); verify(this.servletContext).addFilter(eq("test"), getExpectedFilter()); @@ -148,9 +148,9 @@ public abstract class AbstractFilterRegistrationBeanTests { @Test public void setServletRegistrationBeanReplacesValue() throws Exception { AbstractFilterRegistrationBean bean = createFilterRegistrationBean( - mockServletRegistation("a")); + mockServletRegistration("a")); bean.setServletRegistrationBeans(new LinkedHashSet( - Arrays.asList(mockServletRegistation("b")))); + Arrays.asList(mockServletRegistration("b")))); bean.onStartup(this.servletContext); verify(this.registration).addMappingForServletNames( AbstractFilterRegistrationBean.ASYNC_DISPATCHER_TYPES, false, "b"); @@ -221,7 +221,7 @@ public abstract class AbstractFilterRegistrationBeanTests { protected abstract AbstractFilterRegistrationBean createFilterRegistrationBean( ServletRegistrationBean... servletRegistrationBeans); - protected final ServletRegistrationBean mockServletRegistation(String name) { + protected final ServletRegistrationBean mockServletRegistration(String name) { ServletRegistrationBean bean = new ServletRegistrationBean(); bean.setName(name); return bean; diff --git a/spring-boot/src/test/java/org/springframework/boot/context/embedded/undertow/FileSessionPersistenceTests.java b/spring-boot/src/test/java/org/springframework/boot/context/embedded/undertow/FileSessionPersistenceTests.java index 49272a9dec..a8b4a3cc15 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/embedded/undertow/FileSessionPersistenceTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/embedded/undertow/FileSessionPersistenceTests.java @@ -65,7 +65,7 @@ public class FileSessionPersistenceTests { } @Test - public void presistAndLoad() throws Exception { + public void persistAndLoad() throws Exception { Map sessionData = new LinkedHashMap(); Map data = new LinkedHashMap(); data.put("spring", "boot"); diff --git a/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterTests.java b/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterTests.java index 8ec3cd6228..dcfa15d9c6 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterTests.java @@ -334,7 +334,7 @@ public class ErrorPageFilterTests { } @Test - public void responseIsNotCommitedWhenRequestIsAsync() throws Exception { + public void responseIsNotCommittedWhenRequestIsAsync() throws Exception { this.request.setAsyncStarted(true); this.filter.doFilter(this.request, this.response, this.chain); assertThat(this.chain.getRequest(), equalTo((ServletRequest) this.request)); @@ -344,7 +344,7 @@ public class ErrorPageFilterTests { } @Test - public void responseIsCommitedWhenRequestIsAsyncAndExceptionIsThrown() + public void responseIsCommittedWhenRequestIsAsyncAndExceptionIsThrown() throws Exception { this.filter.addErrorPages(new ErrorPage("/error")); this.request.setAsyncStarted(true); @@ -364,7 +364,7 @@ public class ErrorPageFilterTests { } @Test - public void responseIsCommitedWhenRequestIsAsyncAndStatusIs400Plus() + public void responseIsCommittedWhenRequestIsAsyncAndStatusIs400Plus() throws Exception { this.filter.addErrorPages(new ErrorPage("/error")); this.request.setAsyncStarted(true); @@ -384,7 +384,7 @@ public class ErrorPageFilterTests { } @Test - public void responseIsNotCommitedDuringAsyncDispatch() throws Exception { + public void responseIsNotCommittedDuringAsyncDispatch() throws Exception { setUpAsyncDispatch(); this.filter.doFilter(this.request, this.response, this.chain); assertThat(this.chain.getRequest(), equalTo((ServletRequest) this.request)); @@ -394,7 +394,7 @@ public class ErrorPageFilterTests { } @Test - public void responseIsCommitedWhenExceptionIsThrownDuringAsyncDispatch() + public void responseIsCommittedWhenExceptionIsThrownDuringAsyncDispatch() throws Exception { this.filter.addErrorPages(new ErrorPage("/error")); setUpAsyncDispatch(); @@ -414,7 +414,7 @@ public class ErrorPageFilterTests { } @Test - public void responseIsCommitedWhenStatusIs400PlusDuringAsyncDispatch() + public void responseIsCommittedWhenStatusIs400PlusDuringAsyncDispatch() throws Exception { this.filter.addErrorPages(new ErrorPage("/error")); setUpAsyncDispatch(); diff --git a/spring-boot/src/test/java/org/springframework/boot/json/AbstractJsonParserTests.java b/spring-boot/src/test/java/org/springframework/boot/json/AbstractJsonParserTests.java index 7c72d12247..705c2ec3cc 100644 --- a/spring-boot/src/test/java/org/springframework/boot/json/AbstractJsonParserTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/json/AbstractJsonParserTests.java @@ -43,7 +43,7 @@ public abstract class AbstractJsonParserTests { } @Test - public void testDoubleValie() { + public void testDoubleValue() { Map map = this.parser.parseMap("{\"foo\":\"bar\",\"spam\":1.23}"); assertEquals(2, map.size()); assertEquals("bar", map.get("foo"));