felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1071303 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
Date Wed, 16 Feb 2011 16:29:34 GMT
Author: cziegeler
Date: Wed Feb 16 16:29:33 2011
New Revision: 1071303

URL: http://svn.apache.org/viewvc?rev=1071303&view=rev
Log:
FELIX-2843 : Parsing PID assumes last 4 chars are file extension

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java?rev=1071303&r1=1071302&r2=1071303&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
Wed Feb 16 16:29:33 2011
@@ -18,18 +18,9 @@
  */
 package org.apache.felix.fileinstall.internal;
 
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
+import java.io.*;
 import java.net.URI;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.Properties;
+import java.util.*;
 
 import org.apache.felix.cm.file.ConfigurationHandler;
 import org.apache.felix.fileinstall.ArtifactInstaller;
@@ -37,13 +28,8 @@ import org.apache.felix.fileinstall.Arti
 import org.apache.felix.fileinstall.internal.Util.Logger;
 import org.apache.felix.utils.collections.DictionaryAsMap;
 import org.apache.felix.utils.properties.InterpolationHelper;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.cm.ConfigurationEvent;
-import org.osgi.service.cm.ConfigurationListener;
+import org.osgi.framework.*;
+import org.osgi.service.cm.*;
 
 /**
  * ArtifactInstaller for configurations.
@@ -270,7 +256,7 @@ public class ConfigInstaller implements 
 
     String[] parsePid(String path)
     {
-        String pid = path.substring(0, path.length() - 4);
+        String pid = path.substring(0, path.lastIndexOf('.'));
         int n = pid.indexOf('-');
         if (n > 0)
         {



Mime
View raw message