Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 73269 invoked from network); 12 Jan 2011 08:10:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jan 2011 08:10:40 -0000 Received: (qmail 97881 invoked by uid 500); 12 Jan 2011 08:10:40 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 97770 invoked by uid 500); 12 Jan 2011 08:10:39 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 97762 invoked by uid 99); 12 Jan 2011 08:10:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jan 2011 08:10:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jan 2011 08:10:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 206B523889E9; Wed, 12 Jan 2011 08:10:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1058015 - in /cxf/branches/2.3.x-fixes: ./ tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java tools/corba/src/test/resources/idl/Const.idl tools/corba/src/test/resources/idl/expected_Const.wsdl Date: Wed, 12 Jan 2011 08:10:09 -0000 To: commits@cxf.apache.org From: ffang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110112081009.206B523889E9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ffang Date: Wed Jan 12 08:10:08 2011 New Revision: 1058015 URL: http://svn.apache.org/viewvc?rev=1058015&view=rev Log: Merged revisions 1058014 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1058014 | ffang | 2011-01-12 15:59:28 +0800 (δΈ‰, 12 1 2011) | 1 line [CXF-3239]idl2wsdl fails if invisible const char is defined in IDL ........ Modified: cxf/branches/2.3.x-fixes/ (props changed) cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/Const.idl cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_Const.wsdl Propchange: cxf/branches/2.3.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java?rev=1058015&r1=1058014&r2=1058015&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java (original) +++ cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java Wed Jan 12 08:10:08 2011 @@ -62,10 +62,17 @@ public class ConstVisitor extends Visito AST constTypeNode = constNode.getFirstChild(); AST constNameNode = TypesUtils.getCorbaTypeNameNode(constTypeNode); AST constValueNode = constNameNode.getNextSibling(); - // build value string String constValue = constValueNode.toString(); constValueNode = constValueNode.getFirstChild(); + if (constValue != null && constValue.length() == 1) { + // might be a control char + byte ch = (byte)constValue.charAt(0); + if (ch >= 0 && ch <= 31) { + // ascii code between 0 and 31 is invisible control code + constValue = "\\" + Integer.toOctalString(ch); + } + } while (constValueNode != null) { constValue = constValue + constValueNode.toString(); constValueNode = constValueNode.getFirstChild(); @@ -100,4 +107,5 @@ public class ConstVisitor extends Visito typeMap.getStructOrExceptionOrUnion().add(corbaConst); } + } Modified: cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/Const.idl URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/Const.idl?rev=1058015&r1=1058014&r2=1058015&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/Const.idl (original) +++ cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/Const.idl Wed Jan 12 08:10:08 2011 @@ -32,6 +32,7 @@ const unsigned long glob_unsignedlo const unsigned long long glob_unsignedlonglong = 123456789; const char glob_char = 'r'; +const char glob_char2 = '\2'; const wchar glob_wchar = L'x'; const boolean glob_boolean = FALSE; Modified: cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_Const.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_Const.wsdl?rev=1058015&r1=1058014&r2=1058015&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_Const.wsdl (original) +++ cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_Const.wsdl Wed Jan 12 08:10:08 2011 @@ -29,6 +29,7 @@ +