james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james/nntpserver NNTPHandler.java
Date Mon, 26 Aug 2002 19:46:19 GMT
danny       2002/08/26 12:46:19

  Modified:    src/java/org/apache/james/nntpserver NNTPHandler.java
  Log:
  Patch submitted by Christian Buchegger [christian.buchegger@planet-interkom.de]
  Fixes non-dispatch of NEXT command to handler, and converts CurentArticleNumber from pre-increment
to post-increment.
  I can't see anything to fault this, it seems to deal with boundary condition so I'm commiting
it, but I may be missing something subtle.
  
  Revision  Changes    Path
  1.16      +4 -2      jakarta-james/src/java/org/apache/james/nntpserver/NNTPHandler.java
  
  Index: NNTPHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/nntpserver/NNTPHandler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- NNTPHandler.java	18 Aug 2002 07:30:17 -0000	1.15
  +++ NNTPHandler.java	26 Aug 2002 19:46:18 -0000	1.16
  @@ -220,6 +220,8 @@
               doLISTOVERVIEWFMT();
           else if ( command.equals("GROUP") )
               doGROUP(tokens.hasMoreTokens()?tokens.nextToken():null);
  +        else if ( command.equals("NEXT") )
  +            doNEXT();
           else if ( command.equals("LAST") )
               doLAST();
           else if ( command.equals("ARTICLE") )
  @@ -513,8 +515,8 @@
           else if ( group.getCurrentArticleNumber() >= group.getLastArticleNumber() )
               writer.println("421 no next article in this group");
           else {
  -            NNTPArticle article = group.getCurrentArticle();
               group.setCurrentArticleNumber(group.getCurrentArticleNumber()+1);
  +            NNTPArticle article = group.getCurrentArticle();
               StringBuffer respBuffer =
                   new StringBuffer(64)
                           .append("223 ")
  @@ -534,8 +536,8 @@
           else if ( group.getCurrentArticleNumber() <= group.getFirstArticleNumber() )
               writer.println("422 no previous article in this group");
           else {
  -            NNTPArticle article = group.getCurrentArticle();
               group.setCurrentArticleNumber(group.getCurrentArticleNumber()-1);
  +            NNTPArticle article = group.getCurrentArticle();
               StringBuffer respBuffer =
                   new StringBuffer(64)
                           .append("223 ")
  
  
  

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message