Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 89856 invoked from network); 20 Jul 2009 19:02:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Jul 2009 19:02:57 -0000 Received: (qmail 68158 invoked by uid 500); 20 Jul 2009 19:04:02 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 68090 invoked by uid 500); 20 Jul 2009 19:04:02 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 68081 invoked by uid 99); 20 Jul 2009 19:04:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jul 2009 19:04:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jul 2009 19:04:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2F3012388863; Mon, 20 Jul 2009 19:03:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@felix.apache.org From: filippo@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090720190340.2F3012388863@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;