Skip to content

Commit

Permalink
refactor: DockingDesktop
Browse files Browse the repository at this point in the history
## functional chnage
- Remove static initialization of DockingUISettings
  and do it in the constructor

## Improve robustness
- Check `currentState` nullity when access
- Avoid always running debug logic
- Change stateChange condition to be currentState != null

## initialize
- Move fields initializer to constructor

## Define with lambda
- Define PropertyChangeListener and ActionListener with lambda

## Optimize loop
- Optimize if-else if-else blocks
- Optimize for-loop

## Style
- Remove redundant initializers
- Optimize empty check with isEmpty()
- clean unused local variable
- javadoc: DockingDesktop
- Simplify DockingDesktop#splitComponent method's stateChange local variable definition
- Replace if block of String comparison to switch block
  in xmlCreateComponent private method
  • Loading branch information
miurahr committed Sep 24, 2024
1 parent a935fdd commit 2ad8abe
Showing 1 changed file with 265 additions and 340 deletions.
Loading

0 comments on commit 2ad8abe

Please sign in to comment.