On Fri, 2 Dec 2022 17:28:13 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> Fixed memory leak by removing all the listeners in dispose();
>> 
>> This PR depends on a new internal class ListenerHelper, a replacement for 
>> LambdaMultiplePropertyChangeListenerHandler.
>> See https://github.com/openjdk/jfx/pull/908
>
> Andy Goryachev has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains 29 commits:
> 
>  - Merge remote-tracking branch 'origin/master' into
>    8295175.splitpaneskin.with.helper
>  - Merge remote-tracking branch 'origin/master' into
>    8295175.splitpaneskin.with.helper
>  - Merge remote-tracking branch 'origin/master' into 
> 8295175.splitpaneskin.with.helper
>  - Merge remote-tracking branch 'origin/master' into
>    8295175.splitpaneskin.with.helper
>  - Merge branch '8294809.listener.helper' into 
> 8295175.splitpaneskin.with.helper
>  - 8294809: generics
>  - Merge branch '8294809.listener.helper' into 
> 8295175.splitpaneskin.with.helper
>  - 8294809: is alive
>  - Merge branch '8294809.listener.helper' into 
> 8295175.splitpaneskin.with.helper
>  - Revert "8294809: removed weak listeners support"
>    
>    This reverts commit 2df4a85db638d76cacaf6c54ba669cdb3dd91a18.
>  - ... and 19 more: https://git.openjdk.org/jfx/compare/e64e1292...fb7d9ea6

modules/javafx.controls/src/main/java/javafx/scene/control/skin/SplitPaneSkin.java
 line 627:

> 625:     }
> 626: 
> 627:     private void rebuildDividers(boolean removeAllDividers) {

Looks like this is unnecessary refactoring.
Having a method to add dividers will be clearer than a method that tries to do 
2 things based on input parameter.
We already have `removeAllDividers()` method. Similarly if this method can be 
restricted to `addAllDividers()` (or simply `addDividers()`) the callers can 
make calls to 2 methods whenever required.

modules/javafx.controls/src/main/java/javafx/scene/control/skin/SplitPaneSkin.java
 line 660:

> 658:         lastDividerUpdate = 0;
> 659: 
> 660:         if(contentDividerListenerHelper != null) {

Minor : space after `if`

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

PR: https://git.openjdk.org/jfx/pull/911

Reply via email to