felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fili...@apache.org
Subject svn commit: r795957 - in /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall: DirectoryWatcher.java Jar.java
Date Mon, 20 Jul 2009 19:03:40 GMT
Author: filippo
Date: Mon Jul 20 19:03:39 2009
New Revision: 795957

URL: http://svn.apache.org/viewvc?rev=795957&view=rev
Log:
FELIX-1269 FELIX-1387 cumulative patch submitted by Sahoo

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/Jar.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java?rev=795957&r1=795956&r2=795957&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
Mon Jul 20 19:03:39 2009
@@ -714,7 +714,9 @@
             InputStream in = new FileInputStream(file);
             try
             {
-                bundle = context.installBundle(path, in);
+                // Some users wanted the location to be a URI (See FELIX-1269)
+                final String location = file.toURI().normalize().toString();
+                bundle = context.installBundle(location, in);
             }
             finally
             {
@@ -786,7 +788,6 @@
             bundle.update(in);
             startupFailures.remove(bundle);
             jar.setLastModified(bundle.getLastModified());
-            jar.setLength(file.length());
             log("Updated " + jar.getPath(), null);
             return bundle;
         }

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/Jar.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/Jar.java?rev=795957&r1=795956&r2=795957&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/Jar.java (original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/Jar.java Mon Jul 20
19:03:39 2009
@@ -36,7 +36,6 @@
 class Jar
 {
     private String path;
-    private long length = -1;
     private long lastModified = -1;
     private long bundleId = -1;
 
@@ -49,14 +48,13 @@
         // /tmp/foo and /tmp//foo differently.
         path = file.toURI().normalize().getPath();
         lastModified = file.lastModified();
-        length = file.length();
     }
 
     Jar(Bundle b) throws URISyntaxException
     {
         // Convert to a URI because the location of a bundle
         // is typically a URI. At least, that's the case for
-        // autostart bundles.
+        // autostart bundles and bundles installed by fileinstall.
         // Normalisation is needed to ensure that we don't treat (e.g.)
         // /tmp/foo and /tmp//foo differently.
         String location = b.getLocation();
@@ -94,16 +92,6 @@
         this.lastModified = lastModified;
     }
 
-    public long getLength()
-    {
-        return length;
-    }
-
-    public void setLength(long length)
-    {
-        this.length = length;
-    }
-
     public long getBundleId()
     {
         return bundleId;



Mime
View raw message