--- old/src/java.base/share/classes/java/util/Formatter.java 2018-06-07 19:22:34.030687606 -0700 +++ new/src/java.base/share/classes/java/util/Formatter.java 2018-06-07 19:22:33.524641741 -0700 @@ -2914,7 +2914,7 @@ a.append(System.lineSeparator()); break; case Conversion.PERCENT_SIGN: - a.append('%'); + print("%", l); break; default: assert false; --- old/test/jdk/java/util/Formatter/Basic-X.java.template 2018-06-07 19:22:35.323804808 -0700 +++ new/test/jdk/java/util/Formatter/Basic-X.java.template 2018-06-07 19:22:34.826759758 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/Basic.java 2018-06-07 19:22:36.282891735 -0700 +++ new/test/jdk/java/util/Formatter/Basic.java 2018-06-07 19:22:35.786846776 -0700 @@ -26,7 +26,7 @@ * @bug 4906370 4962433 4973103 4989961 5005818 5031150 4970931 4989491 5002937 * 5005104 5007745 5061412 5055180 5066788 5088703 6317248 6318369 6320122 * 6344623 6369500 6534606 6282094 6286592 6476425 5063507 6469160 6476168 - * 8059175 + * 8059175 8204229 * * @modules java.base * @run shell/timeout=240 Basic.sh --- old/test/jdk/java/util/Formatter/BasicBigDecimal.java 2018-06-07 19:22:37.231977755 -0700 +++ new/test/jdk/java/util/Formatter/BasicBigDecimal.java 2018-06-07 19:22:36.723931709 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicBigInteger.java 2018-06-07 19:22:38.219067220 -0700 +++ new/test/jdk/java/util/Formatter/BasicBigInteger.java 2018-06-07 19:22:37.699020086 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicBoolean.java 2018-06-07 19:22:39.194155597 -0700 +++ new/test/jdk/java/util/Formatter/BasicBoolean.java 2018-06-07 19:22:38.688109732 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicBooleanObject.java 2018-06-07 19:22:40.158242977 -0700 +++ new/test/jdk/java/util/Formatter/BasicBooleanObject.java 2018-06-07 19:22:39.658197656 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicByte.java 2018-06-07 19:22:41.144332352 -0700 +++ new/test/jdk/java/util/Formatter/BasicByte.java 2018-06-07 19:22:40.636286305 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicByteObject.java 2018-06-07 19:22:42.130421726 -0700 +++ new/test/jdk/java/util/Formatter/BasicByteObject.java 2018-06-07 19:22:41.628376223 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicChar.java 2018-06-07 19:22:43.101509740 -0700 +++ new/test/jdk/java/util/Formatter/BasicChar.java 2018-06-07 19:22:42.595463875 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicCharObject.java 2018-06-07 19:22:44.069597483 -0700 +++ new/test/jdk/java/util/Formatter/BasicCharObject.java 2018-06-07 19:22:43.563551618 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicDateTime.java 2018-06-07 19:22:45.058687129 -0700 +++ new/test/jdk/java/util/Formatter/BasicDateTime.java 2018-06-07 19:22:44.551641173 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicDouble.java 2018-06-07 19:22:46.022774510 -0700 +++ new/test/jdk/java/util/Formatter/BasicDouble.java 2018-06-07 19:22:45.517728735 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicDoubleObject.java 2018-06-07 19:22:46.975860892 -0700 +++ new/test/jdk/java/util/Formatter/BasicDoubleObject.java 2018-06-07 19:22:46.474815480 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicFloat.java 2018-06-07 19:22:47.941948454 -0700 +++ new/test/jdk/java/util/Formatter/BasicFloat.java 2018-06-07 19:22:47.440903042 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicFloatObject.java 2018-06-07 19:22:48.918036922 -0700 +++ new/test/jdk/java/util/Formatter/BasicFloatObject.java 2018-06-07 19:22:48.412991147 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicInt.java 2018-06-07 19:22:49.901126024 -0700 +++ new/test/jdk/java/util/Formatter/BasicInt.java 2018-06-07 19:22:49.389079615 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicIntObject.java 2018-06-07 19:22:50.893215942 -0700 +++ new/test/jdk/java/util/Formatter/BasicIntObject.java 2018-06-07 19:22:50.383169714 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicLong.java 2018-06-07 19:22:51.862303776 -0700 +++ new/test/jdk/java/util/Formatter/BasicLong.java 2018-06-07 19:22:51.356257910 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicLongObject.java 2018-06-07 19:22:52.858394056 -0700 +++ new/test/jdk/java/util/Formatter/BasicLongObject.java 2018-06-07 19:22:52.344347466 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicShort.java 2018-06-07 19:22:53.839482977 -0700 +++ new/test/jdk/java/util/Formatter/BasicShort.java 2018-06-07 19:22:53.336437384 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/BasicShortObject.java 2018-06-07 19:22:54.903579422 -0700 +++ new/test/jdk/java/util/Formatter/BasicShortObject.java 2018-06-07 19:22:54.405534282 -0700 @@ -1792,6 +1792,15 @@ //--------------------------------------------------------------------- test("%%", "%", (Object)null); test("%%", "%", ""); + + test("%5%", " %", (Object)null); + test("%5%", " %", ""); + test("%-5%", "% ", (Object)null); + test("%-5%", "% ", ""); + + tryCatch("%.5%", IllegalFormatPrecisionException.class); + tryCatch("%5.5%", IllegalFormatPrecisionException.class); + tryCatch("%%%", UnknownFormatConversionException.class); // perhaps an IllegalFormatArgumentIndexException should be defined? tryCatch("%<%", IllegalFormatFlagsException.class); --- old/test/jdk/java/util/Formatter/genBasic.sh 2018-06-07 19:22:55.868666893 -0700 +++ new/test/jdk/java/util/Formatter/genBasic.sh 2018-06-07 19:22:55.367621481 -0700 @@ -23,7 +23,7 @@ # questions. # -javac -d . ../../../../make/src/classes/build/tools/spp/Spp.java +javac -d . ../../../../../make/jdk/src/classes/build/tools/spp/Spp.java gen() { # if [ $3 = "true" ]