harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cornwall (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5977) [classlib][pack200]
Date Wed, 10 Sep 2008 22:46:46 GMT

                 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() {

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.

View raw message