< prev index next >

test/jdk/java/util/Formatter/NullArg.java

Print this page

        

*** 25,35 **** * @test * @bug 8039390 * @summary Basic test for null argument */ - import java.util.Formatter; import java.util.Locale; public class NullArg { public static void main(String [] args) { --- 25,34 ----
*** 50,63 **** --- 49,68 ---- if (c == 't' || c == 'T') { for (char ct : tcs) { if (!String.format("%" + c + ct, null).equals(expected)) { throw new RuntimeException("%t" + ct + "null check failed."); } + if (!JavacIntrinsicsSupport.stringFormat("%" + c + ct, null).equals(expected)) { + throw new RuntimeException("%t" + ct + "null check failed. " + JavacIntrinsicsSupport.stringFormat("%" + c + ct, null) + " // " + expected); + } } } else { if (!String.format("%" + c , null).equals(expected)) { throw new RuntimeException("%" + c + "null check failed."); } + if (!JavacIntrinsicsSupport.stringFormat("%" + c , null).equals(expected)) { + throw new RuntimeException("%" + c + "null check failed. " + JavacIntrinsicsSupport.stringFormat("%" + c , null) + " // " + expected); + } } } } }
< prev index next >