Skip to content

Commit e5b31be

Browse files
izeyesnicoll
authored andcommitted
Polish
This commit resolves typos and naming inconsistency. Closes gh-4455
1 parent b27d66f commit e5b31be

13 files changed

+37
-37
lines changed

spring-boot/src/main/java/org/springframework/boot/ApplicationHome.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private File findDefaultHomeDir() {
9595
}
9696

9797
/**
98-
* Returns the underlying source used to find the home folder. This is usually the jar
98+
* Returns the underlying source used to find the home directory. This is usually the jar
9999
* file or a directory. Can return {@code null} if the source cannot be determined.
100100
* @return the underlying source or {@code null}
101101
*/
@@ -104,8 +104,8 @@ public File getSource() {
104104
}
105105

106106
/**
107-
* Returns the application home folder.
108-
* @return the home folder (never {@code null})
107+
* Returns the application home directory.
108+
* @return the home directory (never {@code null})
109109
*/
110110
public File getDir() {
111111
return this.dir;

spring-boot/src/main/java/org/springframework/boot/cloud/CloudPlatform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* Simple detection for well known cloud platforms. For more advanced cloud provider
23-
* integration consider the Spring Clould project.
23+
* integration consider the Spring Cloud project.
2424
*
2525
* @author Phillip Webb
2626
* @since 1.3.0

spring-boot/src/main/java/org/springframework/boot/context/embedded/AbstractConfigurableEmbeddedServletContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ protected final ServletContextInitializer[] mergeInitializers(
331331
}
332332

333333
/**
334-
* Returns whether or not he JSP servlet should be registered with the embedded
334+
* Returns whether or not the JSP servlet should be registered with the embedded
335335
* container.
336336
* @return {@code true} if the container should be registered, otherwise {@code false}
337337
*/

spring-boot/src/main/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactory.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public AbstractEmbeddedServletContainerFactory(String contextPath, int port) {
5959
}
6060

6161
/**
62-
* Returns the absolute document root when it points to a valid folder, logging a
62+
* Returns the absolute document root when it points to a valid directory, logging a
6363
* warning and returning {@code null} otherwise.
6464
* @return the valid document root
6565
*/
@@ -171,15 +171,15 @@ protected final File getValidSessionStoreDir(boolean mkdirs) {
171171
*/
172172
protected File createTempDir(String prefix) {
173173
try {
174-
File tempFolder = File.createTempFile(prefix + ".", "." + getPort());
175-
tempFolder.delete();
176-
tempFolder.mkdir();
177-
tempFolder.deleteOnExit();
178-
return tempFolder;
174+
File tempDir = File.createTempFile(prefix + ".", "." + getPort());
175+
tempDir.delete();
176+
tempDir.mkdir();
177+
tempDir.deleteOnExit();
178+
return tempDir;
179179
}
180180
catch (IOException ex) {
181181
throw new EmbeddedServletContainerException(
182-
"Unable to create tempdir. java.io.tmpdir is set to "
182+
"Unable to create tempDir. java.io.tmpdir is set to "
183183
+ System.getProperty("java.io.tmpdir"),
184184
ex);
185185
}

spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public interface ConfigurableEmbeddedServletContainer {
144144
void setMimeMappings(MimeMappings mimeMappings);
145145

146146
/**
147-
* Sets the document root folder which will be used by the web context to serve static
147+
* Sets the document root directory which will be used by the web context to serve static
148148
* files.
149149
* @param documentRoot the document root or {@code null} if not required
150150
*/

spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ private void configurePersistSession(Manager manager) {
411411
Assert.state(manager instanceof StandardManager,
412412
"Unable to persist HTTP session state using manager type "
413413
+ manager.getClass().getName());
414-
File folder = getValidSessionStoreDir();
415-
File file = new File(folder, "SESSIONS.ser");
414+
File dir = getValidSessionStoreDir();
415+
File file = new File(dir, "SESSIONS.ser");
416416
((StandardManager) manager).setPathname(file.getAbsolutePath());
417417
}
418418

spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatResources.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private static class Tomcat7Resources extends TomcatResources {
116116

117117
@Override
118118
protected void addJar(String jar) {
119-
URL url = getJarUlr(jar);
119+
URL url = getJarUrl(jar);
120120
if (url != null) {
121121
try {
122122
this.addResourceJarUrlMethod.invoke(getContext(), url);
@@ -127,7 +127,7 @@ protected void addJar(String jar) {
127127
}
128128
}
129129

130-
private URL getJarUlr(String jar) {
130+
private URL getJarUrl(String jar) {
131131
try {
132132
return new URL(jar);
133133
}

spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/FileSessionPersistence.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
*/
3939
public class FileSessionPersistence implements SessionPersistenceManager {
4040

41-
private final File folder;
41+
private final File dir;
4242

43-
public FileSessionPersistence(File folder) {
44-
this.folder = folder;
43+
public FileSessionPersistence(File dir) {
44+
this.dir = dir;
4545
}
4646

4747
@Override
@@ -124,10 +124,10 @@ private Map<String, SerializablePersistentSession> readSession(
124124
}
125125

126126
private File getSessionFile(String deploymentName) {
127-
if (!this.folder.exists()) {
128-
this.folder.mkdirs();
127+
if (!this.dir.exists()) {
128+
this.dir.mkdirs();
129129
}
130-
return new File(this.folder, deploymentName + ".session");
130+
return new File(this.dir, deploymentName + ".session");
131131
}
132132

133133
@Override

spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public synchronized void start() throws EmbeddedServletContainerException {
113113
}
114114
catch (ServletException ex) {
115115
throw new EmbeddedServletContainerException(
116-
"Unable to start embdedded Undertow", ex);
116+
"Unable to start embedded Undertow", ex);
117117
}
118118
}
119119

spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainerFactory.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ private DeploymentManager createDeploymentManager(
358358
configureAccessLog(deployment);
359359
}
360360
if (isPersistSession()) {
361-
File folder = getValidSessionStoreDir();
362-
deployment.setSessionPersistenceManager(new FileSessionPersistence(folder));
361+
File dir = getValidSessionStoreDir();
362+
deployment.setSessionPersistenceManager(new FileSessionPersistence(dir));
363363
}
364364
DeploymentManager manager = Servlets.defaultContainer().addDeployment(deployment);
365365
manager.deploy();
@@ -433,7 +433,7 @@ private ResourceManager getDocumentRootResourceManager() {
433433
return new FileResourceManager(root, 0);
434434
}
435435
if (root.isFile()) {
436-
return new JarResourcemanager(root);
436+
return new JarResourceManager(root);
437437
}
438438
return ResourceManager.EMPTY_RESOURCE_MANAGER;
439439
}
@@ -532,15 +532,15 @@ public void setUseForwardHeaders(boolean useForwardHeaders) {
532532
/**
533533
* Undertow {@link ResourceManager} for JAR resources.
534534
*/
535-
private static class JarResourcemanager implements ResourceManager {
535+
private static class JarResourceManager implements ResourceManager {
536536

537537
private final String jarPath;
538538

539-
JarResourcemanager(File jarFile) {
539+
JarResourceManager(File jarFile) {
540540
this(jarFile.getAbsolutePath());
541541
}
542542

543-
JarResourcemanager(String jarPath) {
543+
JarResourceManager(String jarPath) {
544544
this.jarPath = jarPath;
545545
}
546546

0 commit comments

Comments
 (0)