Fix 'pid' references in the PortFileWriter

Fix numerous copy-paste errors in EmbeddedServerPortFileWriter
where PID concepts are referenced.

Fixes gh-2161
This commit is contained in:
Phillip Webb 2014-12-15 12:27:19 -08:00
parent 4293b7b797
commit 9f31e09cf0
1 changed files with 10 additions and 8 deletions

View File

@ -46,29 +46,31 @@ public class EmbeddedServerPortFileWriter implements
private static final String[] PROPERTY_VARIABLES = { "PORTFILE", "portfile" }; private static final String[] PROPERTY_VARIABLES = { "PORTFILE", "portfile" };
private static final Log logger = LogFactory.getLog(ApplicationPidFileWriter.class); private static final Log logger = LogFactory
.getLog(EmbeddedServerPortFileWriter.class);
private final File file; private final File file;
/** /**
* Create a new {@link ApplicationPidFileWriter} instance using the filename * Create a new {@link EmbeddedServerPortFileWriter} instance using the filename
* 'application.pid'. * 'application.port'.
*/ */
public EmbeddedServerPortFileWriter() { public EmbeddedServerPortFileWriter() {
this.file = new File(DEFAULT_FILE_NAME); this.file = new File(DEFAULT_FILE_NAME);
} }
/** /**
* Create a new {@link ApplicationPidFileWriter} instance with a specified filename. * Create a new {@link EmbeddedServerPortFileWriter} instance with a specified
* @param filename the name of file containing pid * filename.
* @param filename the name of file containing port
*/ */
public EmbeddedServerPortFileWriter(String filename) { public EmbeddedServerPortFileWriter(String filename) {
this(new File(filename)); this(new File(filename));
} }
/** /**
* Create a new {@link ApplicationPidFileWriter} instance with a specified file. * Create a new {@link EmbeddedServerPortFileWriter} instance with a specified file.
* @param file the file containing pid * @param file the file containing port
*/ */
public EmbeddedServerPortFileWriter(File file) { public EmbeddedServerPortFileWriter(File file) {
Assert.notNull(file, "File must not be null"); Assert.notNull(file, "File must not be null");
@ -91,7 +93,7 @@ public class EmbeddedServerPortFileWriter implements
portFile.deleteOnExit(); portFile.deleteOnExit();
} }
catch (Exception ex) { catch (Exception ex) {
logger.warn(String.format("Cannot create pid file %s", this.file)); logger.warn(String.format("Cannot create port file %s", this.file));
} }
} }