You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2005/04/07 08:03:18 UTC
[jira] Resolved: (XALANJ-2086) Bug in the class org.apache.xml.serializer.Encodings
[ http://issues.apache.org/jira/browse/XALANJ-2086?page=history ]
Brian Minchau resolved XALANJ-2086:
-----------------------------------
Resolution: Fixed
Fix Version: CurrentCVS
Patch applied to CVS.
> 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: CurrentCVS
> 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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org