Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
code cleanup
orbiter4d5446d64140
diff --git a/source/de/anomic/http/server/HTTPDFileHandler.java b/source/de/anomic/http/server/HTTPDFileHandler.javaindex 9ec7f6bfa..cbdbd17b4 100644--- a/source/de/anomic/http/server/HTTPDFileHandler.java+++ b/source/de/anomic/http/server/HTTPDFileHandler.java@@ -1192,26 +1192,6 @@ public final class HTTPDFileHandler {public static final Object invokeServlet(final File targetClass, final RequestHeader request, final serverObjects args) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {// debug functions: for special servlets call them without reflection to get better stack trace results- /*- if (targetClass.getName().equals("transferURL.class")) {- try {- return transferURL.respond(request, args, switchboard);- } catch (Exception e) {- Log.logException(e);- Log.logSevere("HTTPFileHandler", "fail of transferURL", e);- throw new InvocationTargetException(e);- }- }- if (targetClass.getName().equals("crawlReceipt.class")) {- try {- return crawlReceipt.respond(request, args, switchboard);- } catch (Exception e) {- Log.logException(e);- Log.logSevere("HTTPFileHandler", "fail of crawlReceipt", e);- throw new InvocationTargetException(e);- }- }- */Object result;if (safeServletsMode) synchronized (switchboard) {result = rewriteMethod(targetClass).invoke(null, new Object[] {request, args, switchboard});diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex 86d6f900a..27a677c86 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -94,7 +94,7 @@ public final class serverCore extends AbstractBusyThread implements BusyThread {public static final Class<?>[] sessionCallType = {String.class, Session.class}; // set up some reflectionpublic static final long startupTime = System.currentTimeMillis();private static final ThreadGroup sessionThreadGroup = new ThreadGroup("sessionThreadGroup");- private static final Map<String, Object> commandObjMethodCache = new ConcurrentHashMap<String, Object>(5);+ private static final Map<String, Method> commandObjMethodCache = new ConcurrentHashMap<String, Method>(5);/*** will be increased with each session and is used to return a hash code@@ -713,7 +713,7 @@ public final class serverCore extends AbstractBusyThread implements BusyThread {this.controlSocket.setSoTimeout(this.socketTimeout);// exec command and return value- Object commandMethod = commandObjMethodCache.get(reqProtocol + "_" + reqCmd);+ Method commandMethod = commandObjMethodCache.get(reqProtocol + "_" + reqCmd);if (commandMethod == null) {try {commandMethod = this.commandObj.getClass().getMethod(reqCmd, sessionCallType);@@ -724,7 +724,7 @@ public final class serverCore extends AbstractBusyThread implements BusyThread {}}//long commandStart = System.currentTimeMillis();- Object result = ((Method)commandMethod).invoke(this.commandObj, parameter);+ Object result = commandMethod.invoke(this.commandObj, parameter);//announceMoreExecTime(commandStart - System.currentTimeMillis()); // shall be negative!//this.log.logDebug("* session " + handle + " completed command '" + request + "'. time = " + (System.currentTimeMillis() - handle));this.out.flush();diff --git a/source/net/yacy/dbtest.java b/source/net/yacy/dbtest.javaindex 3c6773d1b..d4a4c66ce 100644--- a/source/net/yacy/dbtest.java+++ b/source/net/yacy/dbtest.java@@ -463,6 +463,7 @@ final class memprofiler extends Thread {} catch (final Exception e) {Log.logException(e);}+ ImageIO.setUseCache(false);try {ImageIO.write(memChart.getImage(), "png", outputFile);} catch (final IOException e) {diff --git a/source/net/yacy/gui/YaCyApp.java b/source/net/yacy/gui/YaCyApp.javaindex 0f0e23e05..554e0358e 100644--- a/source/net/yacy/gui/YaCyApp.java+++ b/source/net/yacy/gui/YaCyApp.java@@ -57,6 +57,7 @@ public class YaCyApp {static {try {javax.swing.UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());+ ImageIO.setUseCache(false); // do not write a cache to disc; keep in RAMif (splashFile != null) splashImg = ImageIO.read(splashFile);} catch(Exception e) {e.printStackTrace();