1.1 --- a/src/jdk/internal/dynalink/beans/SingleDynamicMethod.java Tue Aug 19 20:43:03 2014 +0100 1.2 +++ b/src/jdk/internal/dynalink/beans/SingleDynamicMethod.java Wed Aug 20 10:25:28 2014 +0200 1.3 @@ -104,7 +104,7 @@ 1.4 1.5 private static final MethodHandle CAN_CONVERT_TO = Lookup.findOwnStatic(MethodHandles.lookup(), "canConvertTo", boolean.class, LinkerServices.class, Class.class, Object.class); 1.6 1.7 - SingleDynamicMethod(String name) { 1.8 + SingleDynamicMethod(final String name) { 1.9 super(name); 1.10 } 1.11 1.12 @@ -128,22 +128,22 @@ 1.13 abstract MethodHandle getTarget(MethodHandles.Lookup lookup); 1.14 1.15 @Override 1.16 - MethodHandle getInvocation(CallSiteDescriptor callSiteDescriptor, LinkerServices linkerServices) { 1.17 + MethodHandle getInvocation(final CallSiteDescriptor callSiteDescriptor, final LinkerServices linkerServices) { 1.18 return getInvocation(getTarget(callSiteDescriptor.getLookup()), callSiteDescriptor.getMethodType(), 1.19 linkerServices); 1.20 } 1.21 1.22 @Override 1.23 - SingleDynamicMethod getMethodForExactParamTypes(String paramTypes) { 1.24 + SingleDynamicMethod getMethodForExactParamTypes(final String paramTypes) { 1.25 return typeMatchesDescription(paramTypes, getMethodType()) ? this : null; 1.26 } 1.27 1.28 @Override 1.29 - boolean contains(SingleDynamicMethod method) { 1.30 + boolean contains(final SingleDynamicMethod method) { 1.31 return getMethodType().parameterList().equals(method.getMethodType().parameterList()); 1.32 } 1.33 1.34 - static String getMethodNameWithSignature(MethodType type, String methodName) { 1.35 + static String getMethodNameWithSignature(final MethodType type, final String methodName) { 1.36 final String typeStr = type.toString(); 1.37 final int retTypeIndex = typeStr.lastIndexOf(')') + 1; 1.38 int secondParamIndex = typeStr.indexOf(',') + 1; 1.39 @@ -162,7 +162,7 @@ 1.40 * @param linkerServices the linker services used for type conversions 1.41 * @return the adapted method handle. 1.42 */ 1.43 - static MethodHandle getInvocation(MethodHandle target, MethodType callSiteType, LinkerServices linkerServices) { 1.44 + static MethodHandle getInvocation(final MethodHandle target, final MethodType callSiteType, final LinkerServices linkerServices) { 1.45 final MethodType methodType = target.type(); 1.46 final int paramsLen = methodType.parameterCount(); 1.47 final boolean varArgs = target.isVarargsCollector(); 1.48 @@ -264,7 +264,7 @@ 1.49 } 1.50 1.51 @SuppressWarnings("unused") 1.52 - private static boolean canConvertTo(final LinkerServices linkerServices, Class<?> to, Object obj) { 1.53 + private static boolean canConvertTo(final LinkerServices linkerServices, final Class<?> to, final Object obj) { 1.54 return obj == null ? false : linkerServices.canConvert(obj.getClass(), to); 1.55 } 1.56 1.57 @@ -277,7 +277,7 @@ 1.58 * @param parameterCount the total number of arguments in the new method handle 1.59 * @return a collecting method handle 1.60 */ 1.61 - static MethodHandle collectArguments(MethodHandle target, final int parameterCount) { 1.62 + static MethodHandle collectArguments(final MethodHandle target, final int parameterCount) { 1.63 final MethodType methodType = target.type(); 1.64 final int fixParamsLen = methodType.parameterCount() - 1; 1.65 final Class<?> arrayType = methodType.parameterType(fixParamsLen); 1.66 @@ -289,7 +289,7 @@ 1.67 return linkerServices.asType(sizedMethod, callSiteType); 1.68 } 1.69 1.70 - private static boolean typeMatchesDescription(String paramTypes, MethodType type) { 1.71 + private static boolean typeMatchesDescription(final String paramTypes, final MethodType type) { 1.72 final StringTokenizer tok = new StringTokenizer(paramTypes, ", "); 1.73 for(int i = 1; i < type.parameterCount(); ++i) { // i = 1 as we ignore the receiver 1.74 if(!(tok.hasMoreTokens() && typeNameMatches(tok.nextToken(), type.parameterType(i)))) { 1.75 @@ -299,7 +299,7 @@ 1.76 return !tok.hasMoreTokens(); 1.77 } 1.78 1.79 - private static boolean typeNameMatches(String typeName, Class<?> type) { 1.80 + private static boolean typeNameMatches(final String typeName, final Class<?> type) { 1.81 return typeName.equals(typeName.indexOf('.') == -1 ? type.getSimpleName() : type.getCanonicalName()); 1.82 } 1.83 }