Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 74455 invoked from network); 26 Mar 2007 08:53:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Mar 2007 08:53:27 -0000 Received: (qmail 45273 invoked by uid 500); 26 Mar 2007 08:53:31 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 45212 invoked by uid 500); 26 Mar 2007 08:53:31 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 45185 invoked by uid 99); 26 Mar 2007 08:53:31 -0000 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2007 01:53:30 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5209F714070 for ; Mon, 26 Mar 2007 01:52:32 -0700 (PDT) Message-ID: <3216799.1174899152332.JavaMail.jira@brutus> Date: Mon, 26 Mar 2007 01:52:32 -0700 (PDT) From: "Krzysztof Jakubczyk (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Created: (NET-155) Integer is too small to hold article number value (NNTPClient __parseNewsgroupListEntry() function) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Integer is too small to hold article number value (NNTPClient __parseNewsgroupListEntry() function) --------------------------------------------------------------------------------------------------- Key: NET-155 URL: https://issues.apache.org/jira/browse/NET-155 Project: Commons Net Issue Type: Bug Affects Versions: 1.4 Environment: any Reporter: Krzysztof Jakubczyk running the following code: client.connect("news.icm.edu.pl"); NewsgroupInfo[] grps = client.listNewsgroups(); results MalformedServerReplyException (alt.atheism 2147485259 2147483647 y) it's because in function NNTPClient.__parseNewsgroupListEntry(): last = tokenizer.nextToken(); first = tokenizer.nextToken(); permission = tokenizer.nextToken(); try { lastNum = Integer.parseInt(last); firstNum = Integer.parseInt(first); result._setFirstArticle(firstNum); result._setLastArticle(lastNum); if((firstNum == 0) && (lastNum == 0)) result._setArticleCount(0); else result._setArticleCount(lastNum - firstNum + 1); } catch (NumberFormatException e) { return null; } lastNum and firstNum are Integer (too small for received values) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org