FELIX-2221 Throw documented (checked) exception instead of undocumented unchecked exception (IllegalArgumentException)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@926109 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java
index 7ab70c2..36a37e8 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/DataModelHelper.java
@@ -48,6 +48,7 @@
 
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Filter;
+import org.osgi.framework.InvalidSyntaxException;
 
 public interface DataModelHelper {
 
@@ -67,7 +68,7 @@
      * @return
      * @throws org.osgi.framework.InvalidSyntaxException
      */
-    Filter filter(String filter);
+    Filter filter(String filter) throws InvalidSyntaxException;
 
     /**
      * Create a repository from the specified URL.
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java
index 1d63fe1..dace479 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/DataModelHelperImpl.java
@@ -31,9 +31,7 @@
 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 @@
         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 @@
             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)
                 {