RFR: JDK-8209774 - [TESTBUG]Refactor shell test javax/xml/jaxp/common/8035437/run.sh to java
Daniel Fuchs
daniel.fuchs at oracle.com
Fri May 8 14:49:38 UTC 2020
On 08/05/2020 15:40, Alan Bateman wrote:
>> 31 /*
>> 32 * @test
>> 33 * @bug 8035437
>> 34 * @summary Tests that java.lang.AbstractMethodError is not
>> thrown when
>> 35 * serializing improper version of DocumentImpl class.
>> 36 * @library /test/lib
>> * @modules javax.xml/org.w3c.dom
>> * javax.xml/com.sun.org.apache.xerces.internal.dom
>> 40 * @run main/othervm --patch-module java.xml=${test.class.path}
>> AbstractMethodErrorTest
>> 41 */
>>
>> (not 100% sure the @modules is even needed)
> I wouldn't expect to need --patch-module here. Instead maybe it could be
> changed to use @compile/module=java.xml ... and jtreg should compile and
> run the overrides "as if" they are in the java.xml module. There are a
> couple of examples of this in the test suite that might help get this
> going. No need for javax.xml/org.w3c.dom as that package is already
> exported.
Right. Copy paste error. The --patch-module shouldn't be needed
anywhere. Good point about @compile - the main class
AbstractMethodErrorTest is not in the patched module, so
the patched classes may not get compiled if you don't force
their compilation.
Thanks for the correction Alan!
-- daniel
More information about the core-libs-dev
mailing list