You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/04/06 03:09:39 UTC

svn commit: r1089288 - /commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java

Author: sebb
Date: Wed Apr  6 01:09:39 2011
New Revision: 1089288

URL: http://svn.apache.org/viewvc?rev=1089288&view=rev
Log:
Fix deprecations

Modified:
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java?rev=1089288&r1=1089287&r2=1089288&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java (original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactoryTest.java Wed Apr  6 01:09:39 2011
@@ -48,7 +48,7 @@ public class DefaultFTPFileEntryParserFa
             parser = factory.createFileEntryParser("NT");
             fail("Exception should have been thrown. \"NT\" is not a recognized key");
         } catch (ParserInitializationException pie) {
-            assertNull(pie.getRootCause());
+            assertNull(pie.getCause());
             assertTrue(pie.getMessage()+ "should contain 'Unknown parser type:'",
                     pie.getMessage().contains("Unknown parser type:"));
         }
@@ -77,7 +77,7 @@ public class DefaultFTPFileEntryParserFa
             parser = factory.createFileEntryParser("OS2FTPFileEntryParser");
             fail("Exception should have been thrown. \"OS2FTPFileEntryParser\" is not a recognized key");
         } catch (ParserInitializationException pie) {
-            assertNull(pie.getRootCause());
+            assertNull(pie.getCause());
         }
 
         parser = factory.createFileEntryParser(
@@ -89,7 +89,7 @@ public class DefaultFTPFileEntryParserFa
                 "org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory");
             fail("Exception should have been thrown. \"DefaultFTPFileEntryParserFactory\" does not implement FTPFileEntryParser");
         } catch (ParserInitializationException pie) {
-            Throwable root = pie.getRootCause();
+            Throwable root = pie.getCause();
             assertTrue(root instanceof ClassCastException);
         }
 
@@ -98,7 +98,7 @@ public class DefaultFTPFileEntryParserFa
             factory.createFileEntryParser("org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory");
             fail("ParserInitializationException should have been thrown.");
         } catch (ParserInitializationException pie){
-            Throwable root = pie.getRootCause();
+            Throwable root = pie.getCause();
             assertTrue(root instanceof InstantiationException);
         }
         try {
@@ -106,7 +106,7 @@ public class DefaultFTPFileEntryParserFa
             factory.createFileEntryParser("org.apache.commons.net.ftp.FTPFileEntryParserImpl");
             fail("ParserInitializationException should have been thrown.");
         } catch (ParserInitializationException pie){
-            Throwable root = pie.getRootCause();
+            Throwable root = pie.getCause();
             assertTrue(root instanceof InstantiationException);
         }
     }