[ http://issues.apache.org/jira/browse/XALANJ-2086?page=all ]
Brian Minchau updated XALANJ-2086: ---------------------------------- Fix Version: 2.7 (was: CurrentCVS) > Bug in the class org.apache.xml.serializer.Encodings > ---------------------------------------------------- > > Key: XALANJ-2086 > URL: http://issues.apache.org/jira/browse/XALANJ-2086 > Project: XalanJ2 > Type: Bug > Components: Xalan > Versions: 2.6 > Reporter: Jack > Assignee: Brian Minchau > Fix For: 2.7 > Attachments: Encodings.patch1.txt > > There is a bug in the method "findCharToByteConverterMethod()" in the class > org.apache.xml.serializer.Encodings. The original code is: > private static Method findCharToByteConverterMethod() { > try > { > AccessController.doPrivileged(new PrivilegedAction() { > public Object run() { > try { > Class charToByteConverterClass = (Class) > Class.forName("sun.io.CharToByteConverter"); > Class argTypes[] = {String.class}; > return > charToByteConverterClass.getMethod("getConverter", argTypes); > } > catch (Exception e) { > throw new RuntimeException(e.toString()); > } > }}); > } > catch (Exception e) > { > System.err.println( > "Warning: Could not get charToByteConverterClass, haha!"); > } > return null; > } > I suppose there should be a "return" before the > AccessController.doPrivileged() expression. So what I suggest is: > private static Method findCharToByteConverterMethod() { > try > { > return AccessController.doPrivileged(new PrivilegedAction() { > public Object run() { > try { > Class charToByteConverterClass = (Class) > Class.forName("sun.io.CharToByteConverter"); > Class argTypes[] = {String.class}; > return > charToByteConverterClass.getMethod("getConverter", argTypes); > } > catch (Exception e) { > throw new RuntimeException(e.toString()); > } > }}); > } > catch (Exception e) > { > System.err.println( > "Warning: Could not get charToByteConverterClass, haha!"); > } > return null; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]