You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Sian January (JIRA)" <ji...@apache.org> on 2008/09/11 14:27:44 UTC

[jira] Assigned: (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 ]

Sian January reassigned HARMONY-5977:
-------------------------------------

    Assignee: Sian January

> [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
>            Assignee: Sian January
>             Fix For: 5.0M8
>
>         Attachments: main.patch
>
>
> 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.