RFR: 8370140: RichTextArea: line endings [v6]

Andy Goryachev angorya at openjdk.org
Tue Nov 4 21:53:16 UTC 2025


On Tue, 4 Nov 2025 21:06:13 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/LineEnding.java line 33:
>> 
>>> 31:  * @since 26
>>> 32:  */
>>> 33: public enum LineEnding {
>> 
>> Please add an explicit enum value that means "use the value of System.getProperty("line.separator")". Relying on `null` to mean this is not clean for two reasons: 1) it is more difficult to document (case in point, it isn't documented here); and 2) using an enum that might be null in a switch statement without first checking for null will cause an NPE.
>> 
>> Possible names: `NATIVE`? `LINE_SEPARATOR`? something else?
>
> Another possible name: `DEFAULT`
> 
> I'm not sure which one I like best.

`PLATFORM_DEFAULT` maybe?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1944#discussion_r2492141176


More information about the openjfx-dev mailing list