felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r683316 - /felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java
Date Wed, 06 Aug 2008 16:18:50 GMT
Author: mcculls
Date: Wed Aug  6 09:18:48 2008
New Revision: 683316

URL: http://svn.apache.org/viewvc?rev=683316&view=rev
Log:
FELIX-661: another possible leak when including source jars

Modified:
    felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java?rev=683316&r1=683315&r2=683316&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java Wed Aug  6 09:18:48
2008
@@ -26,7 +26,7 @@
     private static final int SPLIT_FIRST       = 4;
     private static final int SPLIT_DEFAULT     = 0;
 
-    List                     inlinedJars       = new ArrayList();
+    List                     tempJars          = new ArrayList();
     boolean                  sources           = false;
     File[]                   sourcePath;
     Pattern                  NAME_URL          = Pattern
@@ -453,6 +453,7 @@
                     if (src != null) {
                         JarResource jarResource = new JarResource(src);
                         jar.putResource(destinationPath, jarResource);
+                        tempJars.add(src);
                     } else {
                         error("Input file does not exist: " + source);
                     }
@@ -490,7 +491,7 @@
             error("Can not find JAR file " + name);
         else {
             jar.addAll(sub, filter);
-            inlinedJars.add(sub);
+            tempJars.add(sub);
         }
     }
 
@@ -767,7 +768,7 @@
     }
 
     public void close() {
-        for (Iterator j = inlinedJars.iterator(); j.hasNext();) {
+        for (Iterator j = tempJars.iterator(); j.hasNext();) {
             Jar jar = (Jar) j.next();
             jar.close();
         }



Mime
View raw message