Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 94142 invoked from network); 6 Oct 2004 20:39:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Oct 2004 20:39:38 -0000 Received: (qmail 510 invoked by uid 500); 6 Oct 2004 20:39:28 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 363 invoked by uid 500); 6 Oct 2004 20:39:27 -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 273 invoked by uid 500); 6 Oct 2004 20:39:24 -0000 Received: (qmail 225 invoked by uid 99); 6 Oct 2004 20:39:23 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 06 Oct 2004 13:39:22 -0700 Received: (qmail 93875 invoked by uid 1289); 6 Oct 2004 20:39:13 -0000 Date: 6 Oct 2004 20:39:13 -0000 Message-ID: <20041006203913.93874.qmail@minotaur.apache.org> From: rdonkin@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read ReadContext.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N rdonkin 2004/10/06 13:39:13 Modified: betwixt/src/java/org/apache/commons/betwixt/io/read ReadContext.java Log: Fixed some of my sloppy coding :( Fix for issue #30990 Revision Changes Path 1.9 +12 -1 jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ReadContext.java Index: ReadContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ReadContext.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ReadContext.java 4 Jul 2004 16:41:16 -0000 1.8 +++ ReadContext.java 6 Oct 2004 20:39:13 -0000 1.9 @@ -221,7 +221,18 @@ * or null if there has been no element mapped */ public String getCurrentElement() { - return (String) elementMappingStack.peek(); + String result = null; + int stackSize = elementMappingStack.size(); + int i = 0; + while ( i < stackSize ) { + Object mappedElement = elementMappingStack.peek(i); + if (mappedElement instanceof String) { + result = (String) mappedElement; + break; + } + --i; + } + return result; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org