--- a/nashorn/src/jdk/internal/dynalink/beans/AccessibleMembersLookup.java Wed Jun 04 13:55:21 2014 +0530
+++ b/nashorn/src/jdk/internal/dynalink/beans/AccessibleMembersLookup.java Wed Jun 04 13:08:57 2014 +0200
@@ -104,7 +104,7 @@
class AccessibleMembersLookup {
private final Map<MethodSignature, Method> methods;
private final Set<Class<?>> innerClasses;
- private boolean instance;
+ private final boolean instance;
/**
* Creates a mapping for all accessible methods and inner classes on a class.
@@ -112,7 +112,7 @@
* @param clazz the inspected class
* @param instance true to inspect instance methods, false to inspect static methods.
*/
- AccessibleMembersLookup(final Class<?> clazz, boolean instance) {
+ AccessibleMembersLookup(final Class<?> clazz, final boolean instance) {
this.methods = new HashMap<>();
this.innerClasses = new LinkedHashSet<>();
this.instance = instance;
@@ -153,7 +153,7 @@
* @param name the name of the method this signature represents.
* @param args the argument types of the method.
*/
- MethodSignature(String name, Class<?>[] args) {
+ MethodSignature(final String name, final Class<?>[] args) {
this.name = name;
this.args = args;
}
@@ -210,7 +210,7 @@
if(!CheckRestrictedPackage.isRestrictedClass(clazz)) {
searchSuperTypes = false;
- for(Method method: clazz.getMethods()) {
+ for(final Method method: clazz.getMethods()) {
final boolean isStatic = Modifier.isStatic(method.getModifiers());
if(instance != isStatic) {
final MethodSignature sig = new MethodSignature(method);
@@ -237,7 +237,7 @@
}
}
}
- for(Class<?> innerClass: clazz.getClasses()) {
+ for(final Class<?> innerClass: clazz.getClasses()) {
// Add both static and non-static classes, regardless of instance flag. StaticClassLinker will just
// expose non-static classes with explicit constructor outer class argument.
// NOTE: getting inner class objects through getClasses() does not resolve them, so if those classes