[Jboss-cvs] JBossAS SVN: r55381 - branches/Branch_4_0/messaging/src/main/org/jboss/mq/xml

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 7 16:33:09 EDT 2006


Author: acoliver at jboss.org
Date: 2006-08-07 16:33:08 -0400 (Mon, 07 Aug 2006)
New Revision: 55381

Modified:
   branches/Branch_4_0/messaging/src/main/org/jboss/mq/xml/XElement.java
Log:
http://jira.jboss.com/jira/browse/JBAS-3484


Modified: branches/Branch_4_0/messaging/src/main/org/jboss/mq/xml/XElement.java
===================================================================
--- branches/Branch_4_0/messaging/src/main/org/jboss/mq/xml/XElement.java	2006-08-07 20:13:20 UTC (rev 55380)
+++ branches/Branch_4_0/messaging/src/main/org/jboss/mq/xml/XElement.java	2006-08-07 20:33:08 UTC (rev 55381)
@@ -705,12 +705,12 @@
 
    private static String utf8Encode( String value ) {
       try {
-         char buff[] = new char[value.length()];
-         value.getChars( 0, buff.length, buff, 0 );
-         sun.io.CharToByteUTF8 conv = new sun.io.CharToByteUTF8();
-         byte b[] = conv.convertAll( buff );
-         return new String( b );
-      } catch ( sun.io.MalformedInputException e ) {
+         //char buff[] = new char[value.length()];
+         //value.getChars( 0, buff.length, buff, 0 );
+         //sun.io.CharToByteUTF8 conv = new sun.io.CharToByteUTF8();
+         //byte b[] = conv.convertAll( buff );
+         return new String( value.getBytes("UTF-8") );
+      } catch ( Exception e ) {
          return null;
       }
    }




More information about the jboss-cvs-commits mailing list