On Tue, 4 Nov 2025 19:06:21 GMT, Kevin Rushforth <[email protected]> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   get text
>
> 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.

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

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

Reply via email to