changeset 41383:dd6dd24db080

8160056: TextField.setText breaks the contract of EOL Reviewed-by: serb, alexsch
author arapte
date Wed, 14 Sep 2016 21:50:44 +0530
parents 791e461e0d03
children 34b9174098ad
files jdk/src/java.desktop/share/classes/java/awt/TextField.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.desktop/share/classes/java/awt/TextField.java	Wed Sep 14 12:13:46 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/java/awt/TextField.java	Wed Sep 14 21:50:44 2016 +0530
@@ -159,8 +159,8 @@
      * @param      text       the text to be displayed. If
      *             {@code text} is {@code null}, the empty
      *             string {@code ""} will be displayed.
-     *             If {@code text} contains EOL character, then
-     *             it will be replaced by space character.
+     *             If {@code text} contains EOL and/or LF characters, then
+     *             each will be replaced by space character.
      * @exception HeadlessException if GraphicsEnvironment.isHeadless()
      * returns true.
      * @see java.awt.GraphicsEnvironment#isHeadless
@@ -192,8 +192,8 @@
      * @param      text       the text to be displayed. If
      *             {@code text} is {@code null}, the empty
      *             string {@code ""} will be displayed.
-     *             If {@code text} contains EOL character, then
-     *             it will be replaced by space character.
+     *             If {@code text} contains EOL and/or LF characters, then
+     *             each will be replaced by space character.
      * @param      columns     the number of columns.  If
      *             {@code columns} is less than {@code 0},
      *             {@code columns} is set to {@code 0}.
@@ -300,8 +300,8 @@
      * @param      t       the new text. If
      *             {@code t} is {@code null}, the empty
      *             string {@code ""} will be displayed.
-     *             If {@code t} contains EOL character, then
-     *             it will be replaced by space character.
+     *             If {@code t} contains EOL and/or LF characters, then
+     *             each will be replaced by space character.
      * @see         java.awt.TextComponent#getText
      */
     public void setText(String t) {