harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3398) [classlib][swing] UIDefaults.getUIClass() uses wrong classloader
Date Thu, 15 Mar 2007 02:15:09 GMT
[classlib][swing] UIDefaults.getUIClass() uses wrong classloader

                 Key: HARMONY-3398
                 URL: https://issues.apache.org/jira/browse/HARMONY-3398
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Vasily Zakharov

For now getUIClass(String) uses ClassLoader.getSystemClassLoader() while it should pass null
to getUIClass(String, ClassLoader) instead, as the spec states:

Returns: the Class object returned by getUIClass(uiClassID, null)

Also, getUIClass(String, ClassLoader), if passed null classloader, now passes that null to
class.forName(), which makes third-party classes loaded by non-system classloader unavailable
for this method. It looks like using Thread.currentThread().getContextClassLoader() instead
is a proper solution.

The test in the attached test patch passes on RI but fails on Harmony, and works fine after
the attached fix patch is applied.

This issue was discovered while investigating issue HARMONY-3385.

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

View raw message