Review request for #6783209

Iris Clark iris.clark at oracle.com
Tue Jan 3 21:27:48 UTC 2012


Hi, Brandon.

I am not a jdk8 Reviewer (http://openjdk.java.net/census#jdk8), but I am the original author.

No time to check the spec now, but is precision ever applicable when the flag '%' is provided?  If it is, then old line 2726 should probably just be changed to "print("%')".

Rather than write a brand new test for this bug, I suggest you add a test case to the rather extensive set of unit tests for Formatter defined by this file:

test/java/util/Formatter/Basic.java

(Look at Basic-X.java.template, line 1703.  Regenerate Basic*.java via Basic.sh.)

Thanks,
iris


-----Original Message-----
From: Brandon Passanisi 
Sent: Tuesday, January 03, 2012 10:37 AM
To: core-libs-dev
Subject: Review request for #6783209

Hello core-libs-dev.  Can someone please do a code review of the following proposed fix for 6783209 : (fmt)Formatter doesn't support width for %%.

    Webrev : http://cr.openjdk.java.net/~bpassani/6783209/0/webrev/
    Bug URL: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6783209

The fix is to use justify() within Formatter.java to do the proper padding when using the '%' conversion.  I have included a new test program to test instances of format specifiers that use the '%' 
conversion with a width value.  The test also includes the testing of '%' without a width to ensure there aren't regressions.

Thanks.
--
Oracle <http://www.oracle.com>
Brandon Passanisi | Principle Member of Technical Staff


Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment



More information about the core-libs-dev mailing list