felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r683308 - /felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java
Date Wed, 06 Aug 2008 15:57:58 GMT
Author: mcculls
Date: Wed Aug  6 08:57:57 2008
New Revision: 683308

URL: http://svn.apache.org/viewvc?rev=683308&view=rev
Log:
FELIX-661: BND builder should remember to close inlined 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=683308&r1=683307&r2=683308&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 08:57:57
2008
@@ -26,6 +26,7 @@
     private static final int SPLIT_FIRST       = 4;
     private static final int SPLIT_DEFAULT     = 0;
 
+    List                     inlinedJars       = new ArrayList();
     boolean                  sources           = false;
     File[]                   sourcePath;
     Pattern                  NAME_URL          = Pattern
@@ -487,8 +488,10 @@
         Jar sub = getJarFromName(name, "extract from jar");
         if (sub == null)
             error("Can not find JAR file " + name);
-        else
+        else {
             jar.addAll(sub, filter);
+            inlinedJars.add(sub);
+        }
     }
 
     private Pattern wildcard(String spec) {
@@ -764,6 +767,10 @@
     }
 
     public void close() {
+        for (Iterator j = inlinedJars.iterator(); j.hasNext();) {
+            Jar jar = (Jar) j.next();
+            jar.close();
+        }
         super.close();
     }
 }



Mime
View raw message