Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8342559

Add a no-arg IO.println() overload, making code easier to migrate from System.out

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • core-libs
    • None

      A familiar idiom from `System.out` is

      System.out.println("Some stuff:");
      System.out.println(stuff);
      System.out.println(); // <--- a blank line here!
      System.out.println("Some more stuff:");

      In the new `IO` preview class (which is possibly moving from java.io to java.lang?), the no-arg `println` isn't there, so some existing code won't convert over cleanly until users change these calls to `println("")`.

      I see no disadvantage to this overload, and it smooths transition and also fits within existing idiom/expectations.

            kbourril kevin bourrillion
            kbourril kevin bourrillion
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: