maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r573466 - in /maven/wagon/branches/wagon-1.x: wagon-provider-api/src/main/java/org/apache/maven/wagon/events/ wagon-providers/wagon-ssh-common/src/test/java/org/apache/maven/wagon/providers/ssh/
Date Fri, 07 Sep 2007 05:47:04 GMT
Author: brett
Date: Thu Sep  6 22:47:03 2007
New Revision: 573466

URL: http://svn.apache.org/viewvc?rev=573466&view=rev
Log:
apply some changes from trunk

Modified:
    maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEventSupport.java
    maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEventSupport.java
    maven/wagon/branches/wagon-1.x/wagon-providers/wagon-ssh-common/src/test/java/org/apache/maven/wagon/providers/ssh/LSParserTest.java

Modified: maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEventSupport.java
URL: http://svn.apache.org/viewvc/maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEventSupport.java?rev=573466&r1=573465&r2=573466&view=diff
==============================================================================
--- maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEventSupport.java
(original)
+++ maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEventSupport.java
Thu Sep  6 22:47:03 2007
@@ -49,7 +49,10 @@
      */
     public void addSessionListener( final SessionListener listener )
     {
-        listeners.add( listener );
+        if ( listener != null )
+        {
+            listeners.add( listener );
+        }
     }
 
     /**

Modified: maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEventSupport.java
URL: http://svn.apache.org/viewvc/maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEventSupport.java?rev=573466&r1=573465&r2=573466&view=diff
==============================================================================
--- maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEventSupport.java
(original)
+++ maven/wagon/branches/wagon-1.x/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEventSupport.java
Thu Sep  6 22:47:03 2007
@@ -51,7 +51,10 @@
      */
     public void addTransferListener( final TransferListener listener )
     {
-        listeners.add( listener );
+        if ( listener != null )
+        {
+            listeners.add( listener );
+        }
     }
 
     /**

Modified: maven/wagon/branches/wagon-1.x/wagon-providers/wagon-ssh-common/src/test/java/org/apache/maven/wagon/providers/ssh/LSParserTest.java
URL: http://svn.apache.org/viewvc/maven/wagon/branches/wagon-1.x/wagon-providers/wagon-ssh-common/src/test/java/org/apache/maven/wagon/providers/ssh/LSParserTest.java?rev=573466&r1=573465&r2=573466&view=diff
==============================================================================
--- maven/wagon/branches/wagon-1.x/wagon-providers/wagon-ssh-common/src/test/java/org/apache/maven/wagon/providers/ssh/LSParserTest.java
(original)
+++ maven/wagon/branches/wagon-1.x/wagon-providers/wagon-ssh-common/src/test/java/org/apache/maven/wagon/providers/ssh/LSParserTest.java
Thu Sep  6 22:47:03 2007
@@ -82,4 +82,23 @@
         assertEquals( 8, files.size() );
         assertTrue( files.contains( "pom.xml" ) );
     }
+
+    /**
+     * Snicoll, Jvanzyl, and Tom reported problems with wagon-ssh.getFileList().
+     * Just adding a real-world example of the ls to see if it is a problem.
+     *   - Joakime
+     */
+    public void testParsePeopleApacheStaging() throws TransferFailedException
+    {
+        String rawLS = "total 6\n"
+            + "drwxr-xr-x  3 snicoll  snicoll  512 Feb  7 11:04 .\n"
+            + "drwxr-xr-x  3 snicoll  snicoll  512 Feb  7 11:04 ..\n"
+            + "drwxr-xr-x  3 snicoll  snicoll  512 Feb  7 11:04 org\n";
+
+        LSParser parser = new LSParser();
+        List files = parser.parseFiles( rawLS );
+        assertNotNull( files );
+        assertEquals( 3, files.size() );
+        assertTrue( files.contains( "org" ) );
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message