db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r483148 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect: JarLoader.java UpdateLoader.java
Date Wed, 06 Dec 2006 16:51:14 GMT
Author: djd
Date: Wed Dec  6 08:51:13 2006
New Revision: 483148

URL: http://svn.apache.org/viewvc?view=rev&rev=483148
Log:
DERBY-538 (partial) Cleanup the setInvalid methods of JarLoader to remove the option of re-creating
the
InstalledJar since it was never used.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java?view=diff&rev=483148&r1=483147&r2=483148
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java
Wed Dec  6 08:51:13 2006
@@ -79,7 +79,7 @@
 		}
 
 		// No such zip.
-		setInvalid(false);	
+		setInvalid();	
 	}
 
 	/**
@@ -273,11 +273,15 @@
 
 	}
 
-	InstalledJar setInvalid(boolean newJarFile) {
+    /**
+     * Set this loader to be invaid so that it will not
+     * resolve any classes or resources.
+     *
+     */
+	void setInvalid() {
 
 		jf.setInvalid();
 		updateLoader = null;
-		return newJarFile ? new InstalledJar(jf.name) : null;
 	}
 
 	/*

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java?view=diff&rev=483148&r1=483147&r2=483148
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java
Wed Dec  6 08:51:13 2006
@@ -233,24 +233,12 @@
 
 		if (!initDone)
 			return;
+        
+        // first close the existing jar file opens
+        close();
 
 		if (reload) {
-			//first close the existing jar file opens
-			close();
 			initializeFromClassPath(thisClasspath);
-			return;
-		}
-
-		// first thing to do is to remove all Class entries
-		// and then get a complete set of loaders ...
-		synchronized (this) {
-
-			for (int i = 0; i < jarList.length; i++) {
-
-				JarLoader jl = jarList[i];
-
-				InstalledJar newJarFile = jl.setInvalid(reload);
-			}
 		}
 	}
 
@@ -292,7 +280,7 @@
 	void close() {
 
 		for (int i = 0; i < jarList.length; i++) {
-			jarList[i].setInvalid(false);
+			jarList[i].setInvalid();
 		}
 
 	}



Mime
View raw message