Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 2.1.7: can not access a member of class with modifiers "public final" #97

Closed
GoogleCodeExporter opened this issue Apr 22, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

��Map xmlAttributes = new HashMap();
....some more code here.....
Iterator it = xmlAttributes.keySet().iterator();
while (it.hasNext()) {
    String attribute = it.next().toString();
    String value = (String)xmlAttributes.get(attribute);
    xmlData.setAttribute(attribute, value);
}

This gives me the following error:

Error in method invocation: Cannot access method hasNext() in 'class 
java.util.HashMap$HashIterator' :java.lang.IllegalAccessException: 
Class bsh.Reflect can not access a member of class 
java.util.HashMap$HashIterator with modifiers "public final" 

Java 1.7.0_51 
Also tried Capabilities.setAccessibility(true); but that didn't change 
anything. 
This worked fine in version 2.1b5. 



Original issue reported on code.google.com by geir....@gmail.com on 7 Feb 2014 at 2:00

@GoogleCodeExporter
Copy link
Author

This seems to be fixed in trunk already

Original comment by pejob...@gmail.com on 10 Feb 2014 at 9:52

@GoogleCodeExporter
Copy link
Author

https://code.google.com/p/beanshell2/source/detail?r=164

Original comment by pejob...@gmail.com on 10 Feb 2014 at 9:54

@GoogleCodeExporter
Copy link
Author

introduced with issue#88

Original comment by pejob...@gmail.com on 10 Feb 2014 at 9:55

  • Changed state: Duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant