diff --git a/src-setup/org/opencms/setup/CmsUpdateBean.java b/src-setup/org/opencms/setup/CmsUpdateBean.java index 419ae45370d..d177c6cf163 100644 --- a/src-setup/org/opencms/setup/CmsUpdateBean.java +++ b/src-setup/org/opencms/setup/CmsUpdateBean.java @@ -59,22 +59,18 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; import javax.servlet.jsp.JspWriter; import org.apache.commons.logging.Log; import com.google.common.collect.Lists; -import com.google.common.collect.MapMaker; /** * A java bean as a controller for the OpenCms update wizard.

@@ -516,58 +512,6 @@ public boolean isNeedDbUpdate() { return m_detectedVersion != 8; } - /** - * Try to preload necessary classes, to avoid ugly class loader issues caused by JARs being deleted during the update. - */ - public void preload() { - - //opencms.jar - preload(OpenCms.class); - - //guava - preload(MapMaker.class); - - //xerces - preload(org.apache.xerces.impl.Constants.class); - } - - /** - * Preloads classes from the same jar file as a given class.

- * - * @param cls the class for which the classes from the same jar file should be loaded - */ - public void preload(Class cls) { - - try { - File jar = new File(cls.getProtectionDomain().getCodeSource().getLocation().getFile()); - java.util.jar.JarFile jarfile = new JarFile(jar); - try { - Enumeration entries = jarfile.entries(); - while (entries.hasMoreElements()) { - JarEntry entry = entries.nextElement(); - String name = entry.getName(); - if (name.endsWith(".class")) { - String className = name.replaceFirst("\\.class$", ""); - className = className.replace('/', '.'); - try { - Class.forName(className); - } catch (VirtualMachineError e) { - throw e; - } catch (Throwable e) { - LOG.error(e.getLocalizedMessage(), e); - } - } - } - } finally { - jarfile.close(); - } - } catch (VirtualMachineError e) { - throw e; - } catch (Throwable e) { - LOG.error(e.getLocalizedMessage(), e); - } - } - /** * Prepares step 1 of the update wizard.

*/ @@ -644,7 +588,6 @@ public void prepareUpdateStep1bOutput(JspWriter out) throws IOException { public void prepareUpdateStep5() { if (isInitialized()) { - preload(); try { String fileName = getWebAppRfsPath() + FOLDER_UPDATE + "cmsupdate"; // read the file