commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1080845 - /commons/proper/net/trunk/src/main/java/examples/nntp/ExtendedNNTPOps.java
Date Sat, 12 Mar 2011 01:58:53 GMT
Author: sebb
Date: Sat Mar 12 01:58:53 2011
New Revision: 1080845

URL: http://svn.apache.org/viewvc?rev=1080845&view=rev
Log:
Detect dummy articles

Modified:
    commons/proper/net/trunk/src/main/java/examples/nntp/ExtendedNNTPOps.java

Modified: commons/proper/net/trunk/src/main/java/examples/nntp/ExtendedNNTPOps.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/nntp/ExtendedNNTPOps.java?rev=1080845&r1=1080844&r2=1080845&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/nntp/ExtendedNNTPOps.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/nntp/ExtendedNNTPOps.java Sat Mar 12 01:58:53
2011
@@ -65,7 +65,11 @@ public class ExtendedNNTPOps {
 
             if (articles != null) {
                 for (Article article : articles) {
-                    System.out.println(article.getSubject());
+                    if (article.isDummy()) { // Subject will contain raw response
+                        System.out.println("Could not parse: "+article.getSubject());
+                    } else {
+                        System.out.println(article.getSubject());
+                    }
                 }
             }
             // LIST ACTIVE



Mime
View raw message