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

Tejesh R duke at openjdk.java.net
Mon Apr 11 05:18:46 UTC 2022


On Mon, 11 Apr 2022 04:51:18 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> 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.......

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

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



More information about the client-libs-dev mailing list