Janino

Access to protected members can fail across package boundaries

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

The following will fail to compile in Janino. The attached patch fixes it and adds a test

ProtectedVariable.java
package foo;
public class ProtectedVariable {
    protected int var = 1;
}
ProtectedVariable.java
package bar;
public static class Top extends foo.ProtectedVariable {
        public class Inner {
            public int get() {
                return var;
            }
        }
}

Activity

Hide
Matt Fowles added a comment -

It is worth note that this is specific to the case of crossing package boundaries.

Show
Matt Fowles added a comment - It is worth note that this is specific to the case of crossing package boundaries.
Hide
Arno Unkrig added a comment -

Your patch will be included into the next JANINO version.

Show
Arno Unkrig added a comment - Your patch will be included into the next JANINO version.
Hide
Matt Fowles added a comment -

Arno, I do not have the ability to close this issue. I think my login to Jira does not have the power. You can consider this closed.

Show
Matt Fowles added a comment - Arno, I do not have the ability to close this issue. I think my login to Jira does not have the power. You can consider this closed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: