On 11/11/2010 16:42, Kumar Srinivasan wrote:
line 176, 188, 190-191, 195, and other lines in printPrintLocales and printLocale methods: - the assignment to the buf and out variable to itself (returned from StringBuffer.append() method) is not necessary.


Yes fixed, I missed these.

The "intention" of returning the StringBuffer itself for those append() methods is that
you can then write the code like


private static void printLocale(PrintStream ostream) {
   ostream.println(new StringBuilder("\n" + LOCALE_SETTINGS + "\n")
                       .append(INDENT)
                      .append("default locale: ")
                      .append(Locale.getDefault().getDisplayLanguage())
                      .append(prettyPrintLocales())
                      .toString());
}


One more nit is that you might want to do something special for

  line.separator =

to make it "readable"

-Sherman

Reply via email to