--- a/langtools/test/tools/javac/MethodParameters/ClassFileVisitor.java Sat Jun 01 21:57:56 2013 +0100
+++ b/langtools/test/tools/javac/MethodParameters/ClassFileVisitor.java Sat Jun 01 22:09:18 2013 +0100
@@ -21,10 +21,8 @@
* questions.
*/
+import java.io.*;
import com.sun.tools.classfile.*;
-import java.io.*;
-import javax.lang.model.element.*;
-import java.util.*;
/**
* The {@code ClassFileVisitor} reads a class file using the
@@ -150,6 +148,7 @@
public int mNumParams;
public boolean mSynthetic;
public boolean mIsConstructor;
+ public boolean mIsBridge;
public String prefix;
void visitMethod(Method method, StringBuilder sb) throws Exception {
@@ -162,6 +161,7 @@
mSynthetic = method.access_flags.is(AccessFlags.ACC_SYNTHETIC);
mIsConstructor = mName.equals("<init>");
prefix = cname + "." + mName + "() - ";
+ mIsBridge = method.access_flags.is(AccessFlags.ACC_BRIDGE);
sb.append(cname).append(".").append(mName).append("(");
@@ -320,6 +320,12 @@
} else if (isEnum && mNumParams == 1 && index == 0 && mName.equals("valueOf")) {
expect = "name";
allowMandated = true;
+ } else if (mIsBridge) {
+ allowSynthetic = true;
+ /* you can't expect an special name for bridges' parameters.
+ * The name of the original parameters are now copied.
+ */
+ expect = null;
}
if (mandated) sb.append("!");
if (synthetic) sb.append("!!");