On Tue, 4 Nov 2025 21:06:13 GMT, Kevin Rushforth <[email protected]> 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

Reply via email to