[OpenJDK 2D-Dev] RFR 8149338: JVM Crash caused by Marlin renderer not handling NaN coordinates
Laurent Bourgès
bourges.laurent at gmail.com
Tue Feb 9 08:51:52 UTC 2016
Jim,
Here are my answers to your 2 questions:
2016-02-09 0:14 GMT+01:00 Jim Graham <james.graham at oracle.com>:
> In the test case, why are you using a log handler to check for a
> particular exception? Shouldn't any exception logged be cause for a test
> failure?
I already used that code in 1 other test: TextClipErrorTest. I agree it can
be simpler to report any exception like:
public void publish(LogRecord record) {
Throwable th = record.getThrown();
// detect any Throwable:
if (th != null) {
System.out.println("Test failed:\n" +
record.getMessage());
th.printStackTrace(System.out);
throw new RuntimeException("Test failed: ", th);
}
}
Is there a reason why you reversed the calculations for the slope at line
> 374?
+ final double slope = (x1d - x2) / (y1d - y2);
I prefer this syntax as it is more explicit that (x1d - x2) and (y1d - y2)
are double values (not implicit promotion).
Cheers,
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160209/1de6ce8c/attachment.html>
More information about the 2d-dev
mailing list