Hi Prasanta,

 

                Thanks for the review.

 

                Regarding the other two constructors, These 2 constructors do 
not take any direct argument as text to be set on TextField.

                Internally these APIs call the  public TextField(String text, 
int columns)   constructor, but with empty string as argument.

                The comment added is API argument based, Hence these 2 
constructors are skipped to add comment.

 

 

Regards,

Ambarish

 

From: prasanta sadhukhan 
Sent: Monday, May 16, 2016 8:41 AM
To: Ambarish Rapte; awt-dev@openjdk.java.net
Cc: Sergey Bylokhov; Semyon Sadetsky
Subject: Re: Review request for 8145284: [Documentation] [TextField] Missing 
new line character handling

 

Hi Ambarish,

Looks good. I guess there is no harm in putting the comments in other 2 
TextField constructor too as those 2 also calls 

public TextField(String text, int columns)

. Also, do not forget to add "noreg-doc" in bug label as there is no testcase.

Regards
Prasanta

On 5/13/2016 9:20 PM, Ambarish Rapte wrote:

Hi Prasanta,

                Please review the updated the webrev, made changes by adding a 
comment to 2 Text Field constructors & setText API.

                Webrev: http://cr.openjdk.java.net/~arapte/8145284/webrev.01/

                

                I shall raise CCC after technical review.

 

 

Regards,

Ambarish

 

From: prasanta sadhukhan 
Sent: Thursday, May 12, 2016 12:44 PM
To: Ambarish Rapte; Sergey Bylokhov; Semyon Sadetsky; HYPERLINK 
"mailto:awt-dev@openjdk.java.net"awt-dev@openjdk.java.net
Subject: Re: Review request for 8145284: [Documentation] [TextField] Missing 
new line character handling

 

Hi Ambarish,

Should we put the doc change at the top or at TextField constructor where you 
actually made the change for 8055197? My take it should be done in the latter.

Also, I think you need a ccc for this.

Regards
Prasanta
On 5/12/2016 12:33 PM, Ambarish Rapte wrote:

Hi,

Please review this documentation change for awt.TextField,

                Bug: https://bugs.openjdk.java.net/browse/JDK-8145284

                Webrev: http://cr.openjdk.java.net/~arapte/8145284/webrev.00/

 

 

What is the change:

                After fix of 8055197, TextField replaces all new line 
characters from input string with space characters.

                This behavior is not documented, hence this change to document 
the behavior.

 

 

Platform Behavior:

                Mac:

                AWT does not use the native NSTextField, but instead delegates 
to JPasswordField, which replaces new line character with space character.

 

                On native Mac platform, NSTextField, is not a one line text 
component.

                If input string contains new line character then NSTextField 
displays multiline text.

                Hence we cannot consider / replicate native platform behavior 
here.

 

 

                Linux:

                AWT delegates to peer side JPasswordField, which replaces new 
line character with space character.

 

 

                Windows:

                The TextField terminates string after the new line character 
and was reported as 8055197.

                Considering the above behavior of Linux and mac, 8055197 was 
fixed on windows by replicating the same behavior of mac and linux.

 

 

After the fix of 8055197, All the platforms uniformly replace new line 
character with space character.

Hence the behavior should be documented.

 

 

 

Regards,

Ambarish

 

 

 

Reply via email to