Make methods 'static' where it missed

Motivation:

Calling a static method is faster then dynamic

Modifications:

Add 'static' keyword for methods where it missed

Result:

A bit faster method calls
This commit is contained in:
Nikolay Fedorovskikh 2017-02-22 23:24:24 +05:00 committed by Norman Maurer
parent 5a181d40ee
commit f7fa1d56e8
2 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ public final class ServerCookieEncoder extends CookieEncoder {
* @param nameToLastIndex A map from cookie name to index of last cookie instance.
* @return The encoded list with all but the last instance of a named cookie.
*/
private List<String> dedup(List<String> encoded, Map<String, Integer> nameToLastIndex) {
private static List<String> dedup(List<String> encoded, Map<String, Integer> nameToLastIndex) {
boolean[] isLastInstance = new boolean[encoded.size()];
for (int idx : nameToLastIndex.values()) {
isLastInstance[idx] = true;

View File

@ -147,7 +147,7 @@ public class SocketSslSessionReuseTest extends AbstractSocketTest {
}
}
private void rethrowHandlerExceptions(ReadAndDiscardHandler sh, ReadAndDiscardHandler ch) throws Throwable {
private static void rethrowHandlerExceptions(ReadAndDiscardHandler sh, ReadAndDiscardHandler ch) throws Throwable {
if (sh.exception.get() != null && !(sh.exception.get() instanceof IOException)) {
throw sh.exception.get();
}
@ -162,7 +162,7 @@ public class SocketSslSessionReuseTest extends AbstractSocketTest {
}
}
private Set<String> sessionIdSet(Enumeration<byte[]> sessionIds) {
private static Set<String> sessionIdSet(Enumeration<byte[]> sessionIds) {
Set<String> idSet = new HashSet<String>();
byte[] id;
while (sessionIds.hasMoreElements()) {