Skip to content

Commit

Permalink
Removed unnecessary return statements at the end of void methods
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1794729 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ebourg committed May 10, 2017
1 parent 3361b13 commit 8a2a441
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion java/javax/servlet/http/HttpServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@ protected void doTrace(HttpServletRequest req, HttpServletResponse resp)
ServletOutputStream out = resp.getOutputStream();
out.print(buffer.toString());
out.close();
return;
}


Expand Down
2 changes: 0 additions & 2 deletions java/org/apache/catalina/connector/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -1456,8 +1456,6 @@ public void removeAttribute(String name) {

// Notify interested application event listeners
notifyAttributeRemoved(name, value);
} else {
return;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public void messageReceived(ClusterMessage myobj) {

}
}
return;
}

/**
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ public void messageReceived(ClusterMessage message) {
}
}
}
return;
}

public int getChannelStartOptions() {
Expand Down
2 changes: 0 additions & 2 deletions java/org/apache/catalina/loader/WebappClassLoaderBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,7 @@ public void removeTransformer(ClassFileTransformer transformer) {
if (this.transformers.remove(transformer)) {
log.info(sm.getString("webappClassLoader.removeTransformer",
transformer, getContextName()));
return;
}

}

protected void copyStateWithoutTransformers(WebappClassLoaderBase base) {
Expand Down
2 changes: 0 additions & 2 deletions java/org/apache/catalina/manager/ManagerServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ protected synchronized void save(PrintWriter writer, String path, StringManager
log("managerServlet.storeConfig", e);
writer.println(smClient.getString("managerServlet.exception",
e.toString()));
return;
}
} else {
String contextPath = path;
Expand All @@ -630,7 +629,6 @@ protected synchronized void save(PrintWriter writer, String path, StringManager
log("managerServlet.save[" + path + "]", e);
writer.println(smClient.getString("managerServlet.exception",
e.toString()));
return;
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions java/org/apache/catalina/manager/host/HostManagerServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,7 @@ protected void start(PrintWriter writer, String name,
"hostManagerServlet.startFailed", name));
writer.println(smClient.getString(
"hostManagerServlet.exception", e.toString()));
return;
}

}


Expand Down Expand Up @@ -642,9 +640,7 @@ protected void stop(PrintWriter writer, String name,
name));
writer.println(smClient.getString("hostManagerServlet.exception",
e.toString()));
return;
}

}


Expand Down Expand Up @@ -675,7 +671,6 @@ protected void persist(PrintWriter writer, StringManager smClient) {
} else {
writer.println(smClient.getString("hostManagerServlet.exception", e.toString()));
}
return;
}
}

Expand Down
1 change: 0 additions & 1 deletion java/org/apache/catalina/realm/JAASMemoryLoginModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ protected void load() {
digester.parse(file);
} catch (Exception e) {
log.warn("Error processing configuration file " + file.getAbsolutePath(), e);
return;
} finally {
digester.reset();
}
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/catalina/startup/Tomcat.java
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,6 @@ public void lifecycleEvent(LifecycleEvent event) {
context.getPipeline().addValve(new NonLoginAuthenticator());
}
} catch (ClassCastException e) {
return;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ protected void drainChannel (final SelectionKey key, ObjectReader reader) throws

if (count < 0) {
remoteEof(key);
return;
}
}

Expand Down
1 change: 0 additions & 1 deletion java/org/apache/catalina/users/MemoryUserDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ public void open() throws Exception {
digester.parse(is);
} catch (IOException ioe) {
log.error(sm.getString("memoryUserDatabase.fileNotFound", pathName));
return;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/coyote/http2/Http2UpgradeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ private void processWrites() throws IOException {
synchronized (socketWrapper) {
if (socketWrapper.flush(false)) {
socketWrapper.registerWriteInterest();
return;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/jasper/servlet/JspServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ private void handleMissingResource(HttpServletRequest request,
jspUri));
}
}
return;
}


Expand Down
1 change: 0 additions & 1 deletion java/org/apache/juli/FileHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public void publish(LogRecord record) {
}
} catch (Exception e) {
reportError(null, e, ErrorManager.WRITE_FAILURE);
return;
}
} finally {
writerLock.readLock().unlock();
Expand Down
2 changes: 0 additions & 2 deletions java/org/apache/tomcat/util/buf/UDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ public void convert( ByteChunk mb, boolean query )
}

mb.setEnd( idx );

return;
}

// -------------------- Additional methods --------------------
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/tomcat/util/http/parser/Cookie.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ public static void parseCookie(byte[] bytes, int offset, int len,
if (b == SEMICOLON_BYTE || b == COMMA_BYTE) {
parseCookieRfc2109(bb, serverCookies, version);
}
return;
} else {
// Unrecognised version.
// Ignore this header.
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/tomcat/util/modeler/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ private void findDescriptor(Class<?> beanClass, String type) {
}
loadDescriptors(pkg, classLoader);
}
return;
}

private ModelerSource getModelerSource( String type )
Expand Down
3 changes: 0 additions & 3 deletions java/org/apache/tomcat/websocket/pojo/PojoEndpointBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,11 @@ protected final void doOnOpen(Session session, EndpointConfig config) {
"pojoEndpointBase.onOpenFail",
pojo.getClass().getName()), e);
handleOnOpenOrCloseError(session, e);
return;
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
handleOnOpenOrCloseError(session, cause);
return;
} catch (Throwable t) {
handleOnOpenOrCloseError(session, t);
return;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public void run() {
System.out.println("Thread["+this.getName()+"] sent "+msgCount+" messages in "+(System.currentTimeMillis()-start)+" ms.");
}catch ( Exception x ) {
x.printStackTrace();
return;
}
}
};
Expand Down Expand Up @@ -102,7 +101,6 @@ public void run() {
System.out.println("Thread["+this.getName()+"] sent "+msgCount+" messages in "+(System.currentTimeMillis()-start)+" ms.");
}catch ( Exception x ) {
x.printStackTrace();
return;
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public void run() {
System.out.println("Thread["+this.getName()+"] sent "+msgCount+" messages in "+(System.currentTimeMillis()-start)+" ms.");
}catch ( Exception x ) {
x.printStackTrace();
return;
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public void run() {
System.out.println("Thread["+this.getName()+"] sent "+msgCount+" messages in "+(System.currentTimeMillis()-start)+" ms.");
}catch ( Exception x ) {
x.printStackTrace();
return;
}
}
};
Expand Down Expand Up @@ -168,7 +167,6 @@ public void run() {
System.out.println("Thread["+this.getName()+"] sent "+msgCount+" messages in "+(System.currentTimeMillis()-start)+" ms.");
}catch ( Exception x ) {
x.printStackTrace();
return;
}
}
};
Expand Down

0 comments on commit 8a2a441

Please sign in to comment.