RFR 8157146: Add debug printlns to tests FieldSetAccessibleTest and VerifyJimage.java

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue May 17 13:08:19 UTC 2016


On 05/17/2016 03:54 PM, Sundararajan Athijegannathan wrote:
> Please review http://cr.openjdk.java.net/~sundar/8157146/webrev.00/ for
> https://bugs.openjdk.java.net/browse/JDK-8157146

Shouldn't it follow the same pattern other catch blocks? Surely you want
to run all test cases, and not abort on the first VerifyError?

 239         } catch (VerifyError ve) {
 240             System.err.println("VerifyError for " + clsName);
 241             throw ve;

Should be:

 239         } catch (VerifyError ve) {
 240             ve.printStackTrace(System.err);
 241             failed.add(s);
 242         } catch (Exception t) {
 243             t.printStackTrace(System.err);
 244             failed.add(s);
 245         } catch (NoClassDefFoundError e) {
 246             e.printStackTrace(System.err);
 247             failed.add(s);


Also I think this should be before the attempt to load the class, to
capture even the failing attempt:

 237             System.out.println("Loading " + clsName);

Ditto for VerifyJimage.java.

Thanks,
-Aleksey




More information about the core-libs-dev mailing list