Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
izeye authored and snicoll committed Nov 21, 2015
1 parent 31d7ebc commit 8ec00c3
Show file tree
Hide file tree
Showing 40 changed files with 70 additions and 70 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ added after the original pull request but before a merge.
If you don't have an IDE preference we would recommend that you use
http://www.springsource.com/developer/sts[Spring Tools Suite] or
http://eclipse.org[Eclipse] when working with the code. We use the
http://eclipse.org/m2e/[m2eclipe] eclipse plugin for maven support. Other IDEs and tools
http://eclipse.org/m2e/[M2Eclipse] eclipse plugin for maven support. Other IDEs and tools
should also work without issue.


Expand Down Expand Up @@ -168,7 +168,7 @@ easier to navigate.

==== Manual installation with m2eclipse
If you prefer to install Eclipse yourself we recommend that you use the
http://eclipse.org/m2e/[m2eclipe] eclipse plugin. If you don't already have m2eclipse
http://eclipse.org/m2e/[M2Eclipse] eclipse plugin. If you don't already have m2eclipse
installed it is available from the "Eclipse marketplace".

Spring Boot includes project specific source formatting settings, in order to have these
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Having trouble with Spring Boot? We'd like to help!

== Reporting Issues
Spring Boot uses GitHub's integrated issue tracking system to record bugs and feature
requests. If you want to raise an issue, please follow the recommendations bellow:
requests. If you want to raise an issue, please follow the recommendations below:

* Before you log a bug, please https://github.com/spring-projects/spring-boot/search?type=Issues[search the issue tracker]
to see if someone has already reported the problem.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ private void prepareLog4J2ForRestart() {
"hooks");
ReflectionUtils.makeAccessible(hooksField);
@SuppressWarnings("unchecked")
Collection<Cancellable> state = (Collection<Cancellable>) ReflectionUtils
Collection<Cancellable> hooks = (Collection<Cancellable>) ReflectionUtils
.getField(hooksField, shutdownCallbackRegistry);
state.clear();
hooks.clear();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void liveReloadTriggeredOnContextRefresh() throws Exception {
}

@Test
public void liveReloadTriggerdOnClassPathChangeWithoutRestart() throws Exception {
public void liveReloadTriggeredOnClassPathChangeWithoutRestart() throws Exception {
this.context = initializeAndRun(ConfigWithMockLiveReload.class);
LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
reset(server);
Expand All @@ -150,7 +150,7 @@ public void liveReloadTriggerdOnClassPathChangeWithoutRestart() throws Exception
}

@Test
public void liveReloadNotTriggerdOnClassPathChangeWithRestart() throws Exception {
public void liveReloadNotTriggeredOnClassPathChangeWithRestart() throws Exception {
this.context = initializeAndRun(ConfigWithMockLiveReload.class);
LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
reset(server);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ public void configuredWithRestartStrategy() throws Exception {
public static class Config {

@Autowired
public Environment environemnt;
public Environment environment;

@Bean
public ClassPathFileSystemWatcher watcher() {
FileSystemWatcher watcher = new FileSystemWatcher(false, 100, 10);
URL[] urls = this.environemnt.getProperty("urls", URL[].class);
URL[] urls = this.environment.getProperty("urls", URL[].class);
return new ClassPathFileSystemWatcher(
new MockFileSystemWatcherFactory(watcher), restartStrategy(), urls);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void getSourceFolders() throws Exception {
}

@Test
public void serialzie() throws Exception {
public void serialize() throws Exception {
ClassLoaderFile file = new ClassLoaderFile(Kind.ADDED, new byte[10]);
this.files.addFile("myfile", file);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class HttpTunnelConnectionTests {

private String url;

private ByteArrayOutputStream incommingData;
private ByteArrayOutputStream incomingData;

private WritableByteChannel incomingChannel;

Expand All @@ -71,8 +71,8 @@ public class HttpTunnelConnectionTests {
public void setup() {
MockitoAnnotations.initMocks(this);
this.url = "http://localhost:" + this.port;
this.incommingData = new ByteArrayOutputStream();
this.incomingChannel = Channels.newChannel(this.incommingData);
this.incomingData = new ByteArrayOutputStream();
this.incomingChannel = Channels.newChannel(this.incomingData);
}

@Test
Expand Down Expand Up @@ -129,7 +129,7 @@ public void typicalTraffic() throws Exception {
write(channel, "hello");
write(channel, "1+1");
write(channel, "1+2");
assertThat(this.incommingData.toString(), equalTo("hi=2=3"));
assertThat(this.incomingData.toString(), equalTo("hi=2=3"));
}

@Test
Expand All @@ -140,7 +140,7 @@ public void trafficWithLongPollTimeouts() throws Exception {
this.requestFactory.willRespond("hi");
TunnelChannel channel = openTunnel(true);
write(channel, "hello");
assertThat(this.incommingData.toString(), equalTo("hi"));
assertThat(this.incomingData.toString(), equalTo("hi"));
assertThat(this.requestFactory.getExecutedRequests().size(), greaterThan(10));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void initialRequestIsSentToServer() throws Exception {
}

@Test
public void intialRequestIsUsedForFirstServerResponse() throws Exception {
public void initialRequestIsUsedForFirstServerResponse() throws Exception {
this.servletRequest.addHeader(SEQ_HEADER, "1");
this.servletRequest.setContent("hello".getBytes());
this.server.handle(this.request, this.response);
Expand All @@ -167,7 +167,7 @@ public void initialRequestHasNoPayload() throws Exception {
}

@Test
public void typicalReqestResponseTraffic() throws Exception {
public void typicalRequestResponseTraffic() throws Exception {
MockHttpConnection h1 = new MockHttpConnection();
this.server.handle(h1);
MockHttpConnection h2 = new MockHttpConnection("hello server", 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class StaticPortProviderTests {
public ExpectedException thrown = ExpectedException.none();

@Test
public void portMustBePostive() throws Exception {
public void portMustBePositive() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("Port must be positive");
new StaticPortProvider(0);
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-docs/src/main/asciidoc/deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ Spring Boot application can be started as Windows service using
https://github.com/kohsuke/winsw[`winsw`].

A sample https://github.com/snicoll-scratches/spring-boot-daemon[maintained separately]
to the core of Spring Boot describes steps by steps how you can create a Windows service for
to the core of Spring Boot describes step by step how you can create a Windows service for
your Spring Boot application.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3964,7 +3964,7 @@ when searching for beans.

TIP: You need to be very careful about the order that bean definitions are added as these
conditions are evaluated based on what has been processed so far. For this reason,
we recommend only using `@ConditionalOnBean` and `@ConditionalOnMissingBean` annotations
we recommend only using `@ConditionalOnBean` and `@ConditionalOnMissingBean` annotations
on auto-configuration classes (since these are guaranteed to load after any user-define
beans definitions have been added).

Expand Down
6 changes: 3 additions & 3 deletions spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ dependencies out-of-the-box so you may want to have a look to the
{propdeps-plugin}[`propdeps-plugin`] in the meantime.

TIP: If you want to ensure that devtools is never included in a production build, you can
use set the `excludeDevtools` build property to completely remove the JAR. The property is
use the `excludeDevtools` build property to completely remove the JAR. The property is
supported with both the Maven and Gradle plugins.


Expand Down Expand Up @@ -1058,7 +1058,7 @@ in the same way.
==== Customizing the restart classloader
As described in the <<using-spring-boot-restart-vs-reload>> section above, restart
functionality is implemented by using two classloaders. For most applications this
approach works well, however, sometimes in can cause classloading issues.
approach works well, however, sometimes it can cause classloading issues.

By default, any open project in your IDE will be loaded using the "`restart`" classloader,
and any regular `.jar` file will be loaded using the "`base`" classloader. If you work on
Expand All @@ -1067,7 +1067,7 @@ customize things. To do this you can create a `META-INF/spring-devtools.properti

The `spring-devtools.properties` file can contain `restart.exclude.` and
`restart.include.` prefixed properties. The `include` elements are items that should be
pulled-up into the "`restart`" classloader, and the `exclude` elements are items that
pulled up into the "`restart`" classloader, and the `exclude` elements are items that
should be pushed down into the "`base`" classloader. The value of the property is a regex
pattern that will be applied to the classpath.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public static String getSpringVersion() {

private static String evaluateExpression(String expression) {
try {
XPathFactory xPathfactory = XPathFactory.newInstance();
XPath xpath = xPathfactory.newXPath();
XPathFactory xPathFactory = XPathFactory.newInstance();
XPath xpath = xPathFactory.newXPath();
XPathExpression expr = xpath.compile(expression);
String version = expr.evaluate(
new InputSource(new FileReader("target/dependencies-pom.xml")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ public static void createProject() throws IOException {
}

@Test
public void onlyTomcatIsPackackedInWebInfLibProvided() throws IOException {
public void onlyTomcatIsPackagedInWebInfLibProvided() throws IOException {
checkWebInfEntriesForServletContainer("tomcat",
TOMCAT_EXPECTED_IN_WEB_INF_LIB_PROVIDED);
}

@Test
public void onlyJettyIsPackackedInWebInfLibProvided() throws IOException {
public void onlyJettyIsPackagedInWebInfLibProvided() throws IOException {
checkWebInfEntriesForServletContainer("jetty",
JETTY_EXPECTED_IN_WEB_INF_LIB_PROVIDED);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public String foo() {
@Bean
public SecurityProperties securityProperties() {
SecurityProperties security = new SecurityProperties();
security.getBasic().setPath(""); // empty so home page is unsecured
security.getBasic().setPath(""); // empty so home page is insecured
return security;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import static org.junit.Assert.assertTrue;

/**
* Integration tests for unsecured service endpoints (even with Spring Security on
* Integration tests for insecured service endpoints (even with Spring Security on
* classpath).
*
* @author Dave Syer
Expand All @@ -46,7 +46,7 @@
@WebIntegrationTest(value = { "management.security.enabled:false" }, randomPort = true)
@DirtiesContext
@ActiveProfiles("unsecure-management")
public class UnsecureManagementSampleActuatorApplicationTests {
public class InsecureManagementSampleActuatorApplicationTests {

@Value("${local.server.port}")
private int port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import static org.junit.Assert.assertFalse;

/**
* Integration tests for unsecured service endpoints (even with Spring Security on
* Integration tests for insecured service endpoints (even with Spring Security on
* classpath).
*
* @author Dave Syer
Expand All @@ -43,7 +43,7 @@
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "security.basic.enabled:false" }, randomPort = true)
@DirtiesContext
public class UnsecureSampleActuatorApplicationTests {
public class InsecureSampleActuatorApplicationTests {

@Value("${local.server.port}")
private int port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import static org.junit.Assert.assertFalse;

/**
* Integration tests for unsecured service endpoints (even with Spring Security on
* Integration tests for insecured service endpoints (even with Spring Security on
* classpath).
*
* @author Dave Syer
Expand All @@ -44,7 +44,7 @@
@WebIntegrationTest(value = { "security.basic.enabled:false",
"server.servletPath:/spring" }, randomPort = true)
@DirtiesContext
public class ServletPathUnsecureSampleActuatorApplicationTests {
public class ServletPathInsecureSampleActuatorApplicationTests {

@Value("${local.server.port}")
private int port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

@RepositoryRestResource(collectionResourceRel = "citys", path = "cities")
@RepositoryRestResource(collectionResourceRel = "cities", path = "cities")
interface CityRepository extends PagingAndSortingRepository<City, Long> {

Page<City> findByNameContainingAndCountryContainingAllIgnoringCase(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ public void findByContaining() throws Exception {
this.mvc.perform(
get("/api/cities/search/findByNameContainingAndCountryContainingAllIgnoringCase?name=&country=UK"))
.andExpect(status().isOk())
.andExpect(jsonPath("_embedded.citys", hasSize(3)));
.andExpect(jsonPath("_embedded.cities", hasSize(3)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void run(String... args) throws Exception {
System.out.println();

// fetch a single product
System.out.println("Products founds with findByNameStartingWith('So'):");
System.out.println("Products found with findByNameStartingWith('So'):");
System.out.println("--------------------------------");
for (Product product : this.repository.findByNameStartingWith("So")) {
System.out.println(product);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $ docker-compose up
----

Run the app and ping the home page (http://localhost:8080) a few times. Go and look at
the result in the TDB UI, e.g.
the result in the TSD UI, e.g.

[source,indent=0]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicLong;

public class InMemoryMessageRespository implements MessageRepository {
public class InMemoryMessageRepository implements MessageRepository {

private static AtomicLong counter = new AtomicLong();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class SampleGroovyTemplateApplication {

@Bean
public MessageRepository messageRepository() {
return new InMemoryMessageRespository();
return new InMemoryMessageRepository();
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ public ConfigurationMetadataRepositoryJsonBuilder withJsonResource(
* ignored.
* <p>
* Leaves the stream open when done.
* @param inputstream the source input stream
* @param inputStream the source input stream
* @param charset the charset of the input
* @return this builder
* @throws IOException in case of I/O errors
*/
public ConfigurationMetadataRepositoryJsonBuilder withJsonResource(
InputStream inputstream, Charset charset) throws IOException {
if (inputstream == null) {
InputStream inputStream, Charset charset) throws IOException {
if (inputStream == null) {
throw new IllegalArgumentException("InputStream must not be null.");
}
this.repositories.add(add(inputstream, charset));
this.repositories.add(add(inputStream, charset));
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private JSONObject toJsonObject(ItemMetadata item) {
}
ItemDeprecation deprecation = item.getDeprecation();
if (deprecation != null) {
jsonObject.put("deprecated", true); // backward compat
jsonObject.put("deprecated", true); // backward compatibility
JSONObject deprecationJsonObject = new JSONObject();
if (deprecation.getReason() != null) {
deprecationJsonObject.put("reason", deprecation.getReason());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void deprecatedProperties() throws Exception {
}

@Test
public void singleDeprecatedProprety() throws Exception {
public void singleDeprecatedProperty() throws Exception {
Class<?> type = DeprecatedSingleProperty.class;
ConfigurationMetadata metadata = compile(type);
assertThat(metadata, containsGroup("singledeprecated").fromSource(type));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public void toDashedCaseCamelCase() {
}

@Test
public void toDashedCaseWordsUnderScore() {
public void toDashedCaseWordsUnderscore() {
assertThat(toDashedCase("Word_With_underscore"), is("word_with_underscore"));
}

@Test
public void toDashedCaseWordsSeveralUnderScores() {
public void toDashedCaseWordsSeveralUnderscores() {
assertThat(toDashedCase("Word___With__underscore"),
is("word___with__underscore"));
}
Expand Down
Loading

0 comments on commit 8ec00c3

Please sign in to comment.