You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2006/11/13 10:53:37 UTC

[jira] Created: (HARMONY-2162) [classlib][luni]Class.forName throws IllegalArgumentException while classname includes '%'

[classlib][luni]Class.forName throws IllegalArgumentException while classname includes '%'
------------------------------------------------------------------------------------------

                 Key: HARMONY-2162
                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
             Project: Harmony
          Issue Type: Bug
            Reporter: Leo Li


Here is the testcase:
          public void testLoadClass()
    {
        try
        {
            Class.forName("%");
            fail("should throw ClassNotFoundException");
        }
        catch(ClassNotFoundException e)
        {
            //expected
        }

RI passes
Harmony fails
    }

-- 
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

        

[jira] Commented: (HARMONY-2162) [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2162?page=comments#action_12449541 ] 
            
Leo Li commented on HARMONY-2162:
---------------------------------

It leads to several failures in testcases of hibernate. In parsing HQL language, it will catch ClassNotFoundException but throw out others that hinders it behave normally. 

> [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2162
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Leo Li
>            Priority: Minor
>
> Here is the testcase:
>           public void testLoadClass()
>     {
>         try
>         {
>             Class.forName("%");
>             fail("should throw ClassNotFoundException");
>         }
>         catch(ClassNotFoundException e)
>         {
>             //expected
>         }
> RI passes
> Harmony fails
>     }

-- 
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

        

[jira] Commented: (HARMONY-2162) [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2162?page=comments#action_12449574 ] 
            
Leo Li commented on HARMONY-2162:
---------------------------------

Verified. Thank you.

> [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2162
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Leo Li
>         Assigned To: Alexey Varlamov
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Here is the testcase:
>           public void testLoadClass()
>     {
>         try
>         {
>             Class.forName("%");
>             fail("should throw ClassNotFoundException");
>         }
>         catch(ClassNotFoundException e)
>         {
>             //expected
>         }
> RI passes
> Harmony fails
>     }

-- 
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

        

[jira] Assigned: (HARMONY-2162) [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2162?page=all ]

Alexey Varlamov reassigned HARMONY-2162:
----------------------------------------

    Assignee: Alexey Varlamov

> [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2162
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Leo Li
>         Assigned To: Alexey Varlamov
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Here is the testcase:
>           public void testLoadClass()
>     {
>         try
>         {
>             Class.forName("%");
>             fail("should throw ClassNotFoundException");
>         }
>         catch(ClassNotFoundException e)
>         {
>             //expected
>         }
> RI passes
> Harmony fails
>     }

-- 
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

        

[jira] Closed: (HARMONY-2162) [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2162?page=all ]

Alexey Varlamov closed HARMONY-2162.
------------------------------------

    Resolution: Fixed

Applied at r474653 - thanks for the patch!

> [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2162
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Leo Li
>         Assigned To: Alexey Varlamov
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Here is the testcase:
>           public void testLoadClass()
>     {
>         try
>         {
>             Class.forName("%");
>             fail("should throw ClassNotFoundException");
>         }
>         catch(ClassNotFoundException e)
>         {
>             //expected
>         }
> RI passes
> Harmony fails
>     }

-- 
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

        

[jira] Updated: (HARMONY-2162) [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2162?page=all ]

Leo Li updated HARMONY-2162:
----------------------------

    Attachment: patch.diff

Will somebody try this?

> [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2162
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Leo Li
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Here is the testcase:
>           public void testLoadClass()
>     {
>         try
>         {
>             Class.forName("%");
>             fail("should throw ClassNotFoundException");
>         }
>         catch(ClassNotFoundException e)
>         {
>             //expected
>         }
> RI passes
> Harmony fails
>     }

-- 
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

        

[jira] Updated: (HARMONY-2162) [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2162?page=all ]

Alexey Varlamov updated HARMONY-2162:
-------------------------------------

        Summary: [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'  (was: [classlib][luni]Class.forName throws IllegalArgumentException while classname includes '%')
    Component/s: DRLVM
       Priority: Minor  (was: Major)

Yep, this is actual for both VMs (j9 and DRLVM). And, this is kernel-specific - therefore changed tag prefix.

BTW, is there any sensible usecase for this bug? I'm lowering priority to "minor" if you don't mind.

> [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2162
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Leo Li
>            Priority: Minor
>
> Here is the testcase:
>           public void testLoadClass()
>     {
>         try
>         {
>             Class.forName("%");
>             fail("should throw ClassNotFoundException");
>         }
>         catch(ClassNotFoundException e)
>         {
>             //expected
>         }
> RI passes
> Harmony fails
>     }

-- 
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

        

[jira] Commented: (HARMONY-2162) [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2162?page=comments#action_12449322 ] 
            
Alexey Varlamov commented on HARMONY-2162:
------------------------------------------

Any ideas how to fix this? Straightforward way is to catch RuntimeException and throw ClassNotFoundException instead (inside Class.forName() ) ...

> [luni-kernel] Class.forName throws IllegalArgumentException while classname includes '%'
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2162
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2162
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Leo Li
>            Priority: Minor
>
> Here is the testcase:
>           public void testLoadClass()
>     {
>         try
>         {
>             Class.forName("%");
>             fail("should throw ClassNotFoundException");
>         }
>         catch(ClassNotFoundException e)
>         {
>             //expected
>         }
> RI passes
> Harmony fails
>     }

-- 
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