8202767: java/awt/font/GlyphVector/TestLayoutFlags.java is missing null check
Reviewed-by: serb
--- a/test/jdk/java/awt/font/GlyphVector/TestLayoutFlags.java Tue May 08 15:30:08 2018 +0530
+++ b/test/jdk/java/awt/font/GlyphVector/TestLayoutFlags.java Tue May 08 10:55:09 2018 -0700
@@ -23,7 +23,7 @@
/* @test
- @bug 4328745 5090704 8166111 8176510
+ @bug 4328745 5090704 8166111 8176510 8202767
@summary exercise getLayoutFlags, getGlyphCharIndex, getGlyphCharIndices
*/
@@ -45,6 +45,9 @@
void runTest() {
Font font = findFont("abcde");
+ if (font == null) {
+ return; // this system is no use for this test.
+ }
String latin1 = "This is a latin1 string"; // none
String hebrew = "\u05d0\u05d1\u05d2\u05d3"; // rtl
@@ -141,6 +144,9 @@
void test(String name, GlyphVector gv, boolean layout, int allowedFlags) {
+ if (gv == null) {
+ return;
+ }
int iv = (layout) ? FLAG_HAS_POSITION_ADJUSTMENTS : 0;
int computedFlags = computeFlags(gv, iv) & gv.FLAG_MASK;