Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 72394 invoked from network); 15 Feb 2005 10:15:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Feb 2005 10:15:46 -0000 Received: (qmail 38858 invoked by uid 500); 15 Feb 2005 10:15:45 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 38808 invoked by uid 500); 15 Feb 2005 10:15:45 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 38794 invoked by uid 99); 15 Feb 2005 10:15:44 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 15 Feb 2005 02:15:44 -0800 Received: (qmail 72286 invoked by uid 1700); 15 Feb 2005 10:15:43 -0000 Date: 15 Feb 2005 10:15:43 -0000 Message-ID: <20050215101543.72285.qmail@minotaur.apache.org> From: toshi@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/java/src/org/apache/axis/utils StringUtils.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N toshi 2005/02/15 02:15:43 Modified: java/src/org/apache/axis/utils StringUtils.java Log: Changed the logic to check the delimiter - ';'. Revision Changes Path 1.9 +2 -7 ws-axis/java/src/org/apache/axis/utils/StringUtils.java Index: StringUtils.java =================================================================== RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/StringUtils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- StringUtils.java 15 Feb 2005 09:36:51 -0000 1.8 +++ StringUtils.java 15 Feb 2005 10:15:43 -0000 1.9 @@ -368,7 +368,7 @@ // if in unicode, then we're reading unicode // values in somehow unicode.append(ch); - if (unicode.length() == 4 && str.charAt(i+1) == ';') { + if (unicode.length() == 4) { // unicode now contains the four hex digits // which represents our unicode character try { @@ -381,11 +381,6 @@ } catch (NumberFormatException nfe) { throw new InternalException(nfe); } - } else if (unicode.length() == 4) { - // can't find the delimiter ';', thus it's an invalid unicode - out.write(unicode.toString()); - unicode.setLength(0); - inUnicode = false; } continue; } else if (ch=='&') { @@ -396,7 +391,7 @@ escapes.append(ch); escapes.append(str.charAt(i+1)); escapes.append(str.charAt(i+2)); - if (escapes.toString().equals("&#x")) { + if (escapes.toString().equals("&#x") && str.charAt(i+7)==';') { inUnicode = true; } else { out.write(escapes.toString());