You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Cornwall (JIRA)" <ji...@apache.org> on 2008/09/11 00:46:46 UTC
[jira] Updated: (HARMONY-5977) [classlib][pack200] nested explicit
class names not handled correctly
[ https://issues.apache.org/jira/browse/HARMONY-5977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Cornwall updated HARMONY-5977:
-------------------------------------
Summary: [classlib][pack200] nested explicit class names not handled correctly (was: [classlib][pack200])
> [classlib][pack200] nested explicit class names not handled correctly
> ---------------------------------------------------------------------
>
> Key: HARMONY-5977
> URL: https://issues.apache.org/jira/browse/HARMONY-5977
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M7
> Environment: All Pack200
> Reporter: Andrew Cornwall
>
> The existing pack200 implementation's unpack code is not taking into account nested classes which have explicit outer class and name fields.
> My initial proposed solution (based on an older code base) was to change IcTuple as follows:
> public boolean shouldAddToRelevantForClassName(String className) {
> // If the outerClassString of the tuple doesn't match the
> // class name of the class we're looking through, don't
> // consider it relevant.
> if (!outerClassString().equals(className)) {
> return false;
> }
> // If it's not anon and the outer is not anon, it's relevant
> if (!isAnonymous() && !outerIsAnonymous()) {
> return true;
> }
> // If the explicit flag is set for a nested class,
> // it's relevant
> if (nestedExplicitFlagSet()) {
> return true;
> }
>
> // Otherwise it's not relevant.
> return false;
> }
> public boolean nestedExplicitFlagSet() {
> return (F & NESTED_CLASS_FLAG) == NESTED_CLASS_FLAG;
> }
> Since that code doesn't exist anymore, I'm suggesting the attached patch. It appears to do the same thing, but uses Aleksey's improved code as a base.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.