You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2008/02/08 18:08:07 UTC

[jira] Created: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

[classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
-------------------------------------------------------------------------------------

                 Key: HARMONY-5477
                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
             Project: Harmony
          Issue Type: Bug
          Components: App-Oriented Bug Reports, Classlib
    Affects Versions: 5.0M5
            Reporter: Vasily Zakharov
            Assignee: Vasily Zakharov


PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.

Here's the test demonstrating the problem:

{code:java}
import java.beans.*;
import java.net.*;

public class Test {
    public static void main(String[] args) {
        try {
            PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
            ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
            Thread.currentThread().setContextClassLoader(editorLoader);
            PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);

            if (editor == null) {
                System.out.println("FAIL: null");
            } else {
                String editorName = editor.getClass().getName();
                System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
            }
        } catch (Throwable e) {
            System.out.print("ERROR: ");
            e.printStackTrace(System.out);
        }
    }
}

class MyClass {
}
{code}

{code:java}
package myPackage;
public class MyClassEditor extends java.beans.PropertyEditorSupport {
}
{code}

Compiled {{MyClassEditor.class}} should be put to {{./editor/myPackage/MyClassEditor.class}} for the test to work.

Output on RI:

{code}SUCCESS{code}

Output on Harmony:

{code}FAIL: null{code}

The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by {{Thread.currentThread().setContextClassLoader()}}, but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in {{PropertyEditorManager.findEditor()}} needs to be changed.

This testcase was derived from {{org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader)}} method.

This issue prevents Geronimo 2.1-snapshot from starting on Harmony.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-5477:
-------------------------------------

    Description: 
PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.

Here's the test demonstrating the problem:

import java.beans.*;
import java.net.*;
public class Test {
    public static void main(String[] args) {
        try {
            PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
            ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
            Thread.currentThread().setContextClassLoader(editorLoader);
            PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
            if (editor == null) {
                System.out.println("FAIL: null");
            } else {
                String editorName = editor.getClass().getName();
                System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
            }
        } catch (Throwable e) {
            System.out.print("ERROR: ");
            e.printStackTrace(System.out);
        }
    }
}

class MyClass {
}

package myPackage;
public class MyClassEditor extends java.beans.PropertyEditorSupport {
}

Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.

Output on RI:

SUCCESS

Output on Harmony:

FAIL: null

The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.

This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.

This issue prevents Geronimo 2.1-snapshot from starting on Harmony.


  was:
PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.

Here's the test demonstrating the problem:

{code:java}
import java.beans.*;
import java.net.*;

public class Test {
    public static void main(String[] args) {
        try {
            PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
            ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
            Thread.currentThread().setContextClassLoader(editorLoader);
            PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);

            if (editor == null) {
                System.out.println("FAIL: null");
            } else {
                String editorName = editor.getClass().getName();
                System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
            }
        } catch (Throwable e) {
            System.out.print("ERROR: ");
            e.printStackTrace(System.out);
        }
    }
}

class MyClass {
}
{code}

{code:java}
package myPackage;
public class MyClassEditor extends java.beans.PropertyEditorSupport {
}
{code}

Compiled {{MyClassEditor.class}} should be put to {{./editor/myPackage/MyClassEditor.class}} for the test to work.

Output on RI:

{code}SUCCESS{code}

Output on Harmony:

{code}FAIL: null{code}

The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by {{Thread.currentThread().setContextClassLoader()}}, but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in {{PropertyEditorManager.findEditor()}} needs to be changed.

This testcase was derived from {{org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader)}} method.

This issue prevents Geronimo 2.1-snapshot from starting on Harmony.



> [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov resolved HARMONY-5477.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M5

Thanks, Tim!

The patch committed at r620654.


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>             Fix For: 5.0M5
>
>         Attachments: Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-5477:
-------------------------------------

    Summary: [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader  (was: [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader)

> [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>         Attachments: Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567103#action_12567103 ] 

Vasily Zakharov commented on HARMONY-5477:
------------------------------------------

a

{code:java}
    code
{code}


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> {code:java}
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> {code}
> {code:java}
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> {code}
> Compiled {{MyClassEditor.class}} should be put to {{./editor/myPackage/MyClassEditor.class}} for the test to work.
> Output on RI:
> {code}SUCCESS{code}
> Output on Harmony:
> {code}FAIL: null{code}
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by {{Thread.currentThread().setContextClassLoader()}}, but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in {{PropertyEditorManager.findEditor()}} needs to be changed.
> This testcase was derived from {{org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader)}} method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-5477:
-------------------------------------

    Comment: was deleted

> [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> {code:java}
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> {code}
> {code:java}
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> {code}
> Compiled {{MyClassEditor.class}} should be put to {{./editor/myPackage/MyClassEditor.class}} for the test to work.
> Output on RI:
> {code}SUCCESS{code}
> Output on Harmony:
> {code}FAIL: null{code}
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by {{Thread.currentThread().setContextClassLoader()}}, but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in {{PropertyEditorManager.findEditor()}} needs to be changed.
> This testcase was derived from {{org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader)}} method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567117#action_12567117 ] 

Tim Ellison commented on HARMONY-5477:
--------------------------------------

Vasily, since you assigned this to yourself I assume you are working on it, otherwise I'm happy to help.


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-5477:
-------------------------------------

    Attachment: Harmony-5477.patch

The patch for the issue attached. Changes:
- Introduced loadEditor() method, that uses the correct class loaders to load the particular editor class.
- findEditor() method rewrtiten to use loadEditor() method for each case, and simplified.
- Minor formatting fixes.

Tim, could you please review the patch before I commit it? Thanks!


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>         Attachments: Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567582#action_12567582 ] 

Tim Ellison commented on HARMONY-5477:
--------------------------------------

I took a look, and all seems good -- thanks Vasily.


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>         Attachments: Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567945#action_12567945 ] 

Stepan Mishura commented on HARMONY-5477:
-----------------------------------------

Vasily, the commit r620654 does not include a regression test. Is it possible to create it? Could you add it?

> [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>             Fix For: 5.0M5
>
>         Attachments: Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568129#action_12568129 ] 

Vasily Zakharov commented on HARMONY-5477:
------------------------------------------

Committed regression test.


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>             Fix For: 5.0M5
>
>         Attachments: Harmony-5477-Test.patch, Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568026#action_12568026 ] 

Vasily Zakharov commented on HARMONY-5477:
------------------------------------------

Yeah, sure, I'll add. Thanks, Stepan!


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>             Fix For: 5.0M5
>
>         Attachments: Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567098#action_12567098 ] 

Vasily Zakharov commented on HARMONY-5477:
------------------------------------------

PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.

Here's the test demonstrating the problem:

{code:java}
import java.beans.*;
import java.net.*;

public class Test {
    public static void main(String[] args) {
        try {
            PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
            ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
            Thread.currentThread().setContextClassLoader(editorLoader);
            PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);

            if (editor == null) {
                System.out.println("FAIL: null");
            } else {
                String editorName = editor.getClass().getName();
                System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
            }
        } catch (Throwable e) {
            System.out.print("ERROR: ");
            e.printStackTrace(System.out);
        }
    }
}

class MyClass {
}
{code}

{code:java}
package myPackage;
public class MyClassEditor extends java.beans.PropertyEditorSupport {
}
{code}

Compiled {{MyClassEditor.class}} should be put to {{./editor/myPackage/MyClassEditor.class}} for the test to work.

Output on RI:

{code}SUCCESS{code}

Output on Harmony:

{code}FAIL: null{code}

The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by {{Thread.currentThread().setContextClassLoader()}}, but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in {{PropertyEditorManager.findEditor()}} needs to be changed.

This testcase was derived from {{org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader)}} method.

This issue prevents Geronimo 2.1-snapshot from starting on Harmony.


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() used wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> {code:java}
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> {code}
> {code:java}
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> {code}
> Compiled {{MyClassEditor.class}} should be put to {{./editor/myPackage/MyClassEditor.class}} for the test to work.
> Output on RI:
> {code}SUCCESS{code}
> Output on Harmony:
> {code}FAIL: null{code}
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by {{Thread.currentThread().setContextClassLoader()}}, but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in {{PropertyEditorManager.findEditor()}} needs to be changed.
> This testcase was derived from {{org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader)}} method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov closed HARMONY-5477.
------------------------------------


The fix seems to work fine, closing the issue.


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>             Fix For: 5.0M5
>
>         Attachments: Harmony-5477-Test.patch, Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5477) [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-5477:
-------------------------------------

    Attachment: Harmony-5477-Test.patch

Attached regression test patch.


> [classlib][beans][geronimo] PropertyEditorManager.findEditor() uses wrong classloader
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5477
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5477
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>    Affects Versions: 5.0M5
>            Reporter: Vasily Zakharov
>            Assignee: Vasily Zakharov
>             Fix For: 5.0M5
>
>         Attachments: Harmony-5477-Test.patch, Harmony-5477.patch
>
>
> PropertyEditorManager.findEditor() always uses the target class loader to locate the editor, while it should use thread context class loader when a particular editor is not found the the target class loader.
> Here's the test demonstrating the problem:
> import java.beans.*;
> import java.net.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             PropertyEditorManager.setEditorSearchPath(new String[] { "myPackage" });
>             ClassLoader editorLoader = new URLClassLoader(new URL[] { new URL("file:./editor/") });
>             Thread.currentThread().setContextClassLoader(editorLoader);
>             PropertyEditor editor = PropertyEditorManager.findEditor(MyClass.class);
>             if (editor == null) {
>                 System.out.println("FAIL: null");
>             } else {
>                 String editorName = editor.getClass().getName();
>                 System.out.println(editorName.equals("myPackage.MyClassEditor") ? "SUCCESS" : ("FAIL: " + editorName));
>             }
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }
> class MyClass {
> }
> package myPackage;
> public class MyClassEditor extends java.beans.PropertyEditorSupport {
> }
> Compiled MyClassEditor.class should be put to ./editor/myPackage/MyClassEditor.class for the test to work.
> Output on RI:
> SUCCESS
> Output on Harmony:
> FAIL: null
> The reason the test fails is the editor is available in other classloader than the original class. That classloader is preliminarily specified by Thread.currentThread().setContextClassLoader(), but Harmony implementation doesn't use it. To fix, the classloader handling mechanism in PropertyEditorManager.findEditor() needs to be changed.
> This testcase was derived from org.apache.geronimo.common.propertyeditor.PropertyEditors.findEditor(String, ClassLoader) method.
> This issue prevents Geronimo 2.1-snapshot from starting on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.