commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r628584 - /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
Date Mon, 18 Feb 2008 00:22:55 GMT
Author: rwinston
Date: Sun Feb 17 16:22:53 2008
New Revision: 628584

URL: http://svn.apache.org/viewvc?rev=628584&view=rev
Log:
NET-182

Modified:
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java?rev=628584&r1=628583&r2=628584&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
Sun Feb 17 16:22:53 2008
@@ -78,6 +78,9 @@
      */
     public FTPFileEntryParser createFileEntryParser(String key)
     {
+    	if (key == null)
+    		throw new ParserInitializationException("Parser key cannot be null");
+    		
         Class parserClass = null;
         FTPFileEntryParser parser = null;
         try
@@ -127,25 +130,14 @@
 	                throw new ParserInitializationException("Unknown parser type: " + key);
 	            }
             } 
-            catch (NoClassDefFoundError nf)
-            { 	
-                if (nf.getMessage().startsWith("org/apache/oro")) {
-    	            throw new ParserInitializationException(
-    	                " jakarta-oro-2.x.jar required on the runtime classpath. ", nf);
-                } else {
+            catch (NoClassDefFoundError nf) {
                     throw new ParserInitializationException("Error initializing parser",
nf);
-                }
             }
 
         }
         catch (NoClassDefFoundError e)
         { 	
-            if (e.getMessage().startsWith("org/apache/oro")) {
-	            throw new ParserInitializationException(
-	                " jakarta-oro-2.x.jar required on the runtime classpath. ", e);
-            } else {
-                throw new ParserInitializationException("Error initializing parser", e);
-            }
+            throw new ParserInitializationException("Error initializing parser", e);
         }
         catch (ClassCastException e)
         {



Mime
View raw message