cbuschka / beanshell2

Automatically exported from code.google.com/p/beanshell2
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
This seems to be fixed in trunk already

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

GoogleCodeExporter commented 8 years ago
https://code.google.com/p/beanshell2/source/detail?r=164

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

GoogleCodeExporter commented 8 years ago
introduced with issue#88

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