Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 33059 invoked from network); 26 Jun 2003 21:59:14 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 26 Jun 2003 21:59:14 -0000 Received: (qmail 10217 invoked by uid 97); 26 Jun 2003 22:01:41 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 10210 invoked from network); 26 Jun 2003 22:01:40 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 26 Jun 2003 22:01:40 -0000 Received: (qmail 32607 invoked by uid 500); 26 Jun 2003 21:59:09 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 32530 invoked from network); 26 Jun 2003 21:59:08 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 26 Jun 2003 21:59:08 -0000 Received: (qmail 10198 invoked by uid 50); 26 Jun 2003 22:01:35 -0000 Date: 26 Jun 2003 22:01:35 -0000 Message-ID: <20030626220135.10197.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 21099] - [lang][PATCH] Unused field 'startFinal' in DateIterator X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21099 [lang][PATCH] Unused field 'startFinal' in DateIterator ------- Additional Comments From janekdb@yahoo.co.uk 2003-06-26 22:01 ------- The parameter 'startFinal' is used twice, once to assign to the field 'this.startFinal' and then to assign to the field 'this.spot'. It's the field which is unused not the parameter. Sorry for the confusion. The patch file explained it better than I did! /** * Date iterator. */ static class DateIterator implements Iterator { private final Calendar startFinal; private final Calendar endFinal; private Calendar spot = null; DateIterator(Calendar startFinal, Calendar endFinal) { super(); this.startFinal = startFinal; this.endFinal = endFinal; spot = startFinal; spot.add(Calendar.DATE, -1); } public boolean hasNext() { return spot.before(endFinal); } public Object next() { if (spot.equals(endFinal)) { throw new NoSuchElementException(); } spot.add(Calendar.DATE, 1); return spot.clone(); } public void remove() { throw new UnsupportedOperationException(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org