You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2006/10/08 12:41:45 UTC

svn commit: r454124 - in /james/server/trunk/src/java/org/apache/james/context: AvalonContextUtilities.java AvalonFileSystem.java

Author: norman
Date: Sun Oct  8 03:41:45 2006
New Revision: 454124

URL: http://svn.apache.org/viewvc?view=rev&rev=454124
Log:
Catch missing IllegalArgumentException

Modified:
    james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java
    james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java

Modified: james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java?view=diff&rev=454124&r1=454123&r2=454124
==============================================================================
--- james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java (original)
+++ james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java Sun Oct  8 03:41:45 2006
@@ -63,7 +63,7 @@
      *                          not correct, or if an IOException is generated
      *                          while accessing the file.
      */
-    public static File getFile(Context context, String fileURL) throws ContextException {
+    public static File getFile(Context context, String fileURL) throws ContextException, IllegalArgumentException {
         if ((context == null) || (fileURL == null)) {
             throw new IllegalArgumentException("The getFile method doesn't allow null arguments.");
         }

Modified: james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java?view=diff&rev=454124&r1=454123&r2=454124
==============================================================================
--- james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java (original)
+++ james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java Sun Oct  8 03:41:45 2006
@@ -47,6 +47,8 @@
             return AvalonContextUtilities.getFile(context, fileURL);
         } catch (ContextException e) {
             throw new FileNotFoundException("Context exception: "+e.getMessage());
+        } catch (IllegalArgumentException e) {
+            throw new FileNotFoundException("Context exception: "+e.getMessage());
         }
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: svn commit: r454124 - in /james/server/trunk/src/java/org/apache/james/context: AvalonContextUtilities.java AvalonFileSystem.java

Posted by Stefano Bagnara <ap...@bago.org>.
Ok, now I'm fine with the patch ;-)

Thank you,
Stefano

norman@apache.org wrote:
> Author: norman
> Date: Sun Oct  8 03:41:45 2006
> New Revision: 454124
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=454124
> Log:
> Catch missing IllegalArgumentException
> 
> Modified:
>     james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java
>     james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java
> 
> Modified: james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java
> URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java?view=diff&rev=454124&r1=454123&r2=454124
> ==============================================================================
> --- james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java (original)
> +++ james/server/trunk/src/java/org/apache/james/context/AvalonContextUtilities.java Sun Oct  8 03:41:45 2006
> @@ -63,7 +63,7 @@
>       *                          not correct, or if an IOException is generated
>       *                          while accessing the file.
>       */
> -    public static File getFile(Context context, String fileURL) throws ContextException {
> +    public static File getFile(Context context, String fileURL) throws ContextException, IllegalArgumentException {
>          if ((context == null) || (fileURL == null)) {
>              throw new IllegalArgumentException("The getFile method doesn't allow null arguments.");
>          }
> 
> Modified: james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java
> URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java?view=diff&rev=454124&r1=454123&r2=454124
> ==============================================================================
> --- james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java (original)
> +++ james/server/trunk/src/java/org/apache/james/context/AvalonFileSystem.java Sun Oct  8 03:41:45 2006
> @@ -47,6 +47,8 @@
>              return AvalonContextUtilities.getFile(context, fileURL);
>          } catch (ContextException e) {
>              throw new FileNotFoundException("Context exception: "+e.getMessage());
> +        } catch (IllegalArgumentException e) {
> +            throw new FileNotFoundException("Context exception: "+e.getMessage());
>          }
>      }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org