felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r926109 - in /felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository: DataModelHelper.java impl/DataModelHelperImpl.java
Date Mon, 22 Mar 2010 14:49:32 GMT
Author: fmeschbe
Date: Mon Mar 22 14:49:31 2010
New Revision: 926109

URL: http://svn.apache.org/viewvc?rev=926109&view=rev
Log:
FELIX-2221 Throw documented (checked) exception instead of undocumented unchecked exception
(IllegalArgumentException)

Modified:
    felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java
    felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java

Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java?rev=926109&r1=926108&r2=926109&view=diff
==============================================================================
--- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java
(original)
+++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java
Mon Mar 22 14:49:31 2010
@@ -48,6 +48,7 @@ import java.util.jar.Attributes;
 
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Filter;
+import org.osgi.framework.InvalidSyntaxException;
 
 public interface DataModelHelper {
 
@@ -67,7 +68,7 @@ public interface DataModelHelper {
      * @return
      * @throws org.osgi.framework.InvalidSyntaxException
      */
-    Filter filter(String filter);
+    Filter filter(String filter) throws InvalidSyntaxException;
 
     /**
      * Create a repository from the specified URL.

Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java?rev=926109&r1=926108&r2=926109&view=diff
==============================================================================
--- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java
(original)
+++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java
Mon Mar 22 14:49:31 2010
@@ -31,9 +31,7 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 import java.util.jar.Attributes;
-import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
-import java.util.jar.JarInputStream;
 import java.util.jar.Manifest;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
@@ -74,18 +72,9 @@ public class DataModelHelperImpl impleme
         return req;
     }
 
-    public Filter filter(String filter)
+    public Filter filter(String filter) throws InvalidSyntaxException
     {
-        try
-        {
-            return FilterImpl.newInstance(filter);
-        }
-        catch (InvalidSyntaxException e)
-        {
-            IllegalArgumentException ex = new IllegalArgumentException();
-            ex.initCause(e);
-            throw ex;
-        }
+        return FilterImpl.newInstance(filter);
     }
 
     public Repository repository(final URL url) throws Exception
@@ -407,7 +396,7 @@ public class DataModelHelperImpl impleme
             private Properties localization;
             {
                 // Do not use a JarInputStream so that we can read the manifest even if it's
not
-                // the first entry in the JAR.  
+                // the first entry in the JAR.
                 byte[] man = loadEntry(JarFile.MANIFEST_NAME);
                 if (man == null)
                 {



Mime
View raw message