On 7/09/2013 1:28 AM, Alan Bateman wrote:
On 06/09/2013 15:18, David Chase wrote:
webrev: http://cr.openjdk.java.net/~drchase/8022701/webrev.00/

Question #2, what's the best way to write a jtreg test suite that
requires incompatible class files, that could not result from a single
javac compilation?
Can you coerce ASM into creating it? Alternatively it is something that
you can create off-line and include in a class as a byte array (to load
via your own URLClassLoader)?

Multiple @compile tags in the main test?

David
-----


Question #3, the message(s) attached to the exception are not the same
in all cases:

a. IllegalAccessError's been caught java.lang.IllegalAccessError:
member is private: MethodSupplier.m()void/invokeVirtual, from
MethodInvoker

b. IllegalAccessError's been caught java.lang.IllegalAccessError:
tried to access method MethodSupplier.m()V from class MethodInvoker

c. IllegalAccessError's been caught java.lang.IllegalAccessError:

d. IllegalAccessError's been caught java.lang.IllegalAccessError:
tried to access method MethodSupplier.m()V from class MethodInvoker

The difference between a. and c. above (and these are the two that
change under this fix, the code the execution definitely intersects at
the fix) is:

a = Class.forName("MethodInvoker").getMethod("invoke").invoke(null);
c = MethodInvoker.invoke();

yet one has the message copied from the underlying
IllegalAccessException (not IAError) and the other does not.
Do you mean you want the messages to be consistent? (I don't think I
quite get the question).

-Alan



Reply via email to