commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1032805 - in /commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp: ArticlePointer.java NNTPClient.java NewsgroupInfo.java
Date Tue, 09 Nov 2010 01:37:33 GMT
Author: sebb
Date: Tue Nov  9 01:37:33 2010
New Revision: 1032805

URL: http://svn.apache.org/viewvc?rev=1032805&view=rev
Log:
Revert NET-276 changes that break the binary API
Will be re-applied in 3.0

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java?rev=1032805&r1=1032804&r2=1032805&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java
(original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/ArticlePointer.java
Tue Nov  9 01:37:33 2010
@@ -28,7 +28,7 @@ package org.apache.commons.net.nntp;
 public final class ArticlePointer
 {
     /** The number of the referenced article. */
-    public long articleNumber;
+    public int articleNumber;
     /**
      * The unique id of the referenced article, including the enclosing
      * &lt and &gt symbols which are technically not part of the

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPClient.java?rev=1032805&r1=1032804&r2=1032805&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPClient.java Tue
Nov  9 01:37:33 2010
@@ -108,7 +108,7 @@ public class NNTPClient extends NNTP
             // Get article number
             try
             {
-                pointer.articleNumber = Long.parseLong(tokenizer.nextToken());
+                pointer.articleNumber = Integer.parseInt(tokenizer.nextToken());
             }
             catch (NumberFormatException e)
             {
@@ -153,9 +153,9 @@ public class NNTPClient extends NNTP
 
             try
             {
-                info._setArticleCount(Long.parseLong(count));
-                info._setFirstArticle(Long.parseLong(first));
-                info._setLastArticle(Long.parseLong(last));
+                info._setArticleCount(Integer.parseInt(count));
+                info._setFirstArticle(Integer.parseInt(first));
+                info._setLastArticle(Integer.parseInt(last));
             }
             catch (NumberFormatException e)
             {
@@ -176,7 +176,7 @@ public class NNTPClient extends NNTP
     {
         NewsgroupInfo result;
         StringTokenizer tokenizer;
-        long lastNum, firstNum;
+        int lastNum, firstNum;
         String last, first, permission;
 
         result = new NewsgroupInfo();
@@ -192,8 +192,8 @@ public class NNTPClient extends NNTP
 
         try
         {
-            lastNum = Long.parseLong(last);
-            firstNum = Long.parseLong(first);
+            lastNum = Integer.parseInt(last);
+            firstNum = Integer.parseInt(first);
             result._setFirstArticle(firstNum);
             result._setLastArticle(lastNum);
 
@@ -1212,8 +1212,8 @@ public class NNTPClient extends NNTP
      * @return a DotTerminatedReader if successful, null otherwise
      * @throws IOException
      */
-    public Reader retrieveArticleInfo(long lowArticleNumber,
-                                      long highArticleNumber)
+    public Reader retrieveArticleInfo(int lowArticleNumber,
+                                      int highArticleNumber)
         throws IOException
     {
         return

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java?rev=1032805&r1=1032804&r2=1032805&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java
(original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NewsgroupInfo.java
Tue Nov  9 01:37:33 2010
@@ -54,8 +54,8 @@ public final class NewsgroupInfo
     public static final int PROHIBITED_POSTING_PERMISSION = 3;
 
     private String __newsgroup;
-    private long __estimatedArticleCount;
-    private long __firstArticle, __lastArticle;
+    private int __estimatedArticleCount;
+    private int __firstArticle, __lastArticle;
     private int __postingPermission;
 
     void _setNewsgroup(String newsgroup)
@@ -63,17 +63,17 @@ public final class NewsgroupInfo
         __newsgroup = newsgroup;
     }
 
-    void _setArticleCount(long count)
+    void _setArticleCount(int count)
     {
         __estimatedArticleCount = count;
     }
 
-    void _setFirstArticle(long first)
+    void _setFirstArticle(int first)
     {
         __firstArticle = first;
     }
 
-    void _setLastArticle(long last)
+    void _setLastArticle(int last)
     {
         __lastArticle = last;
     }
@@ -99,7 +99,7 @@ public final class NewsgroupInfo
      * <p>
      * @return The estimated number of articles in the newsgroup.
      ***/
-    public long getArticleCount()
+    public int getArticleCount()
     {
         return __estimatedArticleCount;
     }
@@ -109,7 +109,7 @@ public final class NewsgroupInfo
      * <p>
      * @return The number of the first article in the newsgroup.
      ***/
-    public long getFirstArticle()
+    public int getFirstArticle()
     {
         return __firstArticle;
     }
@@ -119,7 +119,7 @@ public final class NewsgroupInfo
      * <p>
      * @return The number of the last article in the newsgroup.
      ***/
-    public long getLastArticle()
+    public int getLastArticle()
     {
         return __lastArticle;
     }



Mime
View raw message