RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2]

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Mon Apr 11 05:24:36 UTC 2022


On Mon, 11 Apr 2022 05:15:22 GMT, Tejesh R <duke at openjdk.java.net> wrote:

> > If this is true, then I guess we can remove `if (array[counter - 1] == '\r')` check too as it is always true in windows.
> 
> If user uses system line separator then it vll be '\r\n' and it vll enter this loop, but if user manually enters \n in the string (unusual case) then it vll enter the else part....... To handle those unusual scenarios else case is required I guess.......

I guess in that case "else" part in l359 will be executed...I was talking about requirement of "else" part in l345

-------------

PR: https://git.openjdk.java.net/jdk/pull/8122



More information about the client-libs-dev mailing list