cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/nntp NNTPClient.java

2004-11-26 Thread rwinston
rwinston2004/11/26 01:41:32

  Modified:net/src/java/org/apache/commons/net/nntp NNTPClient.java
  Log:
  Handle the condition where the low and high water marks are 0, as per bug 
32152
  
  Revision  ChangesPath
  1.15  +5 -1  
jakarta-commons/net/src/java/org/apache/commons/net/nntp/NNTPClient.java
  
  Index: NNTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/nntp/NNTPClient.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- NNTPClient.java   29 Jun 2004 04:54:31 -  1.14
  +++ NNTPClient.java   26 Nov 2004 09:41:32 -  1.15
  @@ -193,7 +193,11 @@
   firstNum = Integer.parseInt(first);
   result._setFirstArticle(firstNum);
   result._setLastArticle(lastNum);
  -result._setArticleCount(lastNum - firstNum + 1);
  +
  + if((firstNum == 0) && (lastNum == 0))
  + result._setArticleCount(0);
  + else
  + result._setArticleCount(lastNum - firstNum + 1);
   }
   catch (NumberFormatException e)
   {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/nntp NNTPClient.java

2004-04-11 Thread dfs
dfs 2004/04/11 17:46:26

  Modified:net/src/java/org/apache/commons/net/nntp NNTPClient.java
  Log:
  Changed a 'new Integer(int).toString()' call to
  'Integer.toString(int)', using a static method instead of creating a
  new object..
  
  Revision  ChangesPath
  1.11  +3 -2  
jakarta-commons/net/src/java/org/apache/commons/net/nntp/NNTPClient.java
  
  Index: NNTPClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/nntp/NNTPClient.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- NNTPClient.java   10 Apr 2004 21:11:48 -  1.10
  +++ NNTPClient.java   12 Apr 2004 00:46:26 -  1.11
  @@ -1193,7 +1193,7 @@
*/
   public Reader retrieveArticleInfo(int articleNumber) throws IOException 
   {
  -return __retrieveArticleInfo(new Integer(articleNumber).toString());
  +return __retrieveArticleInfo(Integer.toString(articleNumber));
   }
   
   /**
  @@ -1243,7 +1243,8 @@
* @return a DotTerminatedReader if successful, null otherwise
* @throws IOException
*/
  -public Reader retrieveHeader(String header, int articleNumber) throws 
IOException 
  +public Reader retrieveHeader(String header, int articleNumber)
  +throws IOException 
   {
   return __retrieveHeader(header, Integer.toString(articleNumber));
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]