On Tue, 19 May 2026 21:43:02 GMT, Kevin Rushforth <[email protected]> wrote:

>> Andy Goryachev has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 180 commits:
>> 
>>  - Merge branch 'master' into 8356042.ruler
>>  - incubator
>>  - Merge remote-tracking branch 'origin/master' into 8356042.ruler
>>  - \@
>>  - format version
>>  - review comments
>>  - Merge branch 'master' into 8356042.ruler
>>  - review comments
>>  - Merge branch 'master' into 8356042.ruler
>>  - add exports
>>  - ... and 170 more: https://git.openjdk.org/jfx/compare/277aec13...f8fa16d0
>
> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/StyledSegment.java
>  line 262:
> 
>> 260:      * @since 27
>> 261:      */
>> 262:     public static StyledSegment ofVersion(String version) {
> 
> What is the advantage of making the version number be a `StyledSegment` (as 
> opposed to a separate type, e.g., `Header` or `Version`)?

_"Entities must not be multiplied beyond necessity"_

I think there is no need in separate classes (and the corresponding 
`instanceof` operation), any required logic can be implemented as a switch on 
`.getType()`

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1800#discussion_r3269975142

Reply via email to