Return-Path: Delivered-To: apmail-incubator-felix-commits-archive@www.apache.org Received: (qmail 15827 invoked from network); 4 Mar 2006 03:44:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Mar 2006 03:44:30 -0000 Received: (qmail 20460 invoked by uid 500); 4 Mar 2006 03:45:16 -0000 Delivered-To: apmail-incubator-felix-commits-archive@incubator.apache.org Received: (qmail 20422 invoked by uid 500); 4 Mar 2006 03:45:16 -0000 Mailing-List: contact felix-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: felix-dev@incubator.apache.org Delivered-To: mailing list felix-commits@incubator.apache.org Received: (qmail 20410 invoked by uid 99); 4 Mar 2006 03:45:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 19:45:16 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 03 Mar 2006 19:45:15 -0800 Received: (qmail 15673 invoked by uid 65534); 4 Mar 2006 03:44:08 -0000 Message-ID: <20060304034407.15664.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r383016 - in /incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework: Felix.java cache/DefaultBundleArchive.java cache/DefaultBundleCache.java Date: Sat, 04 Mar 2006 03:44:06 -0000 To: felix-commits@incubator.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rickhall Date: Fri Mar 3 19:44:05 2006 New Revision: 383016 URL: http://svn.apache.org/viewcvs?rev=383016&view=rev Log: Fixed a bug in installing bundles where the input stream was being ignored if supplied. This bug was introduced when the changes for supporting bundle install by reference an exploded directories were recently introduced. Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleCache.java Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java?rev=383016&r1=383015&r2=383016&view=diff ============================================================================== --- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java (original) +++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java Fri Mar 3 19:44:05 2006 @@ -1859,7 +1859,7 @@ try { // Add the bundle to the cache. - m_cache.create(id, location); + m_cache.create(id, location, is); } catch (Exception ex) { @@ -3925,4 +3925,4 @@ m_bundleLock.notifyAll(); } } -} \ No newline at end of file +} Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java?rev=383016&r1=383015&r2=383016&view=diff ============================================================================== --- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java (original) +++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java Fri Mar 3 19:44:05 2006 @@ -105,18 +105,21 @@ *

* This constructor is used for creating new archives when a bundle is * installed into the framework. Each archive receives a logger, a root - * directory, its associated bundle identifier, and the associated bundle - * location string. The root directory is where any required state can be - * stored. + * directory, its associated bundle identifier, the associated bundle + * location string, and an input stream from which to read the bundle + * content. The root directory is where any required state can be + * stored. The input stream may be null, in which case the location is + * used as an URL to the bundle content. *

* @param logger the logger to be used by the archive. * @param archiveRootDir the archive root directory for storing state. * @param id the bundle identifier associated with the archive. * @param location the bundle location string associated with the archive. + * @param is input stream from which to read the bundle content. * @throws Exception if any error occurs. **/ public DefaultBundleArchive( - Logger logger, File archiveRootDir, long id, String location) + Logger logger, File archiveRootDir, long id, String location, InputStream is) throws Exception { m_logger = logger; @@ -133,7 +136,7 @@ initialize(); // Add a revision for the content. - revise(getCurrentLocation(), null); + revise(getCurrentLocation(), is); } /** @@ -958,4 +961,4 @@ if (os != null) os.close(); } } -} \ No newline at end of file +} Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleCache.java URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleCache.java?rev=383016&r1=383015&r2=383016&view=diff ============================================================================== --- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleCache.java (original) +++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/DefaultBundleCache.java Fri Mar 3 19:44:05 2006 @@ -131,7 +131,8 @@ return -1; } - public synchronized DefaultBundleArchive create(long id, String location) + public synchronized DefaultBundleArchive create( + long id, String location, InputStream is) throws Exception { // Construct archive root directory. @@ -141,7 +142,8 @@ try { // Create the archive and add it to the list of archives. - DefaultBundleArchive ba = new DefaultBundleArchive(m_logger, archiveRootDir, id, location); + DefaultBundleArchive ba = + new DefaultBundleArchive(m_logger, archiveRootDir, id, location, is); DefaultBundleArchive[] tmp = new DefaultBundleArchive[m_archives.length + 1]; System.arraycopy(m_archives, 0, tmp, 0, m_archives.length); tmp[m_archives.length] = ba; @@ -342,4 +344,4 @@ m_archives = (DefaultBundleArchive[]) archiveList.toArray(new DefaultBundleArchive[archiveList.size()]); } -} \ No newline at end of file +}