Skip to content

Commit

Permalink
Remove redundant keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jul 9, 2024
1 parent e033ce0 commit 365eddb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/test/java/org/apache/commons/daemon/SimpleDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ public class SimpleDaemon implements Daemon, Runnable, DaemonUserSignal {
private boolean softReloadSignalled;

public SimpleDaemon() {
System.err.println("SimpleDaemon: instance " + this.hashCode() + " created");
System.err.println("SimpleDaemon: instance " + hashCode() + " created");
this.handlers = new Vector<>();
}

@Override
protected void finalize() {
System.err.println("SimpleDaemon: instance " + this.hashCode() + " garbage collected");
System.err.println("SimpleDaemon: instance " + hashCode() + " garbage collected");
}

/**
* init and destroy were added in jakarta-tomcat-daemon.
*/
@Override
public void init(final DaemonContext context) throws Exception {
System.err.println("SimpleDaemon: instance " + this.hashCode() + " init");
System.err.println("SimpleDaemon: instance " + hashCode() + " init");

int port = 1200;

Expand Down Expand Up @@ -98,7 +98,7 @@ public void stop() throws IOException, InterruptedException {

@Override
public void destroy() {
System.err.println("SimpleDaemon: instance " + this.hashCode() + " destroy");
System.err.println("SimpleDaemon: instance " + hashCode() + " destroy");
}

@Override
Expand Down Expand Up @@ -282,9 +282,9 @@ public void handle(final InputStream in, final OutputStream os) {

/* Disconnect */
case '3':
final String name = this.getDirectoryName() + "/SimpleDaemon." + this.getConnectionNumber() + ".tmp";
final String name = getDirectoryName() + "/SimpleDaemon." + getConnectionNumber() + ".tmp";
try {
this.log(name);
log(name);
out.println("File '" + name + "' created");
} catch (final IOException e) {
e.printStackTrace(out);
Expand Down Expand Up @@ -314,7 +314,7 @@ public void handle(final InputStream in, final OutputStream os) {

/* If we get an IOException we return (disconnect) */
} catch (final IOException e) {
System.err.println("SimpleDaemon: IOException in " + "connection " + this.getConnectionNumber());
System.err.println("SimpleDaemon: IOException in " + "connection " + getConnectionNumber());
return;
}
}
Expand Down

0 comments on commit 365eddb

Please sign in to comment.