diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-20 20:04:02 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-20 20:04:02 +0300 |
| commit | f0b58321ae53f330da86c392661354b87bd9a412 (patch) | |
| tree | c0be72f57094d13cf8bcb53567614258a6eb43fa /src/main/java/utils/VSAboutFrame.java | |
| parent | c3b95267b24d843897b04d6d6a16f62dc8cf1ed2 (diff) | |
Modernize codebase to use Java 21 features
- Convert VS3Tupel and VSLamportTime to records for immutability
- Use switch expressions with pattern matching in VSTimestampTriggeredEvent
- Modernize exception handling with pattern matching in VSErrorHandler
- Replace anonymous ActionListener with lambda in VSAboutFrame
- Use formatted strings instead of concatenation in VSDummyProtocol
- Add sealed hierarchy VSEventType for exhaustive pattern matching
- Create VSSimulationConfig record for configuration management
- Maintain backward compatibility with deprecated methods
All 132 unit tests pass successfully with Java 21 features.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'src/main/java/utils/VSAboutFrame.java')
| -rw-r--r-- | src/main/java/utils/VSAboutFrame.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/utils/VSAboutFrame.java b/src/main/java/utils/VSAboutFrame.java index e07289f..76f3cbd 100644 --- a/src/main/java/utils/VSAboutFrame.java +++ b/src/main/java/utils/VSAboutFrame.java @@ -73,12 +73,10 @@ public class VSAboutFrame extends VSFrame { JButton closeButton = new JButton( prefs.getString("lang.close")); closeButton.setMnemonic(prefs.getInteger("keyevent.close")); - closeButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - String actionCommand = e.getActionCommand(); - if (actionCommand.equals(prefs.getString("lang.close"))) - dispose(); - } + closeButton.addActionListener(e -> { + String actionCommand = e.getActionCommand(); + if (actionCommand.equals(prefs.getString("lang.close"))) + dispose(); }); buttonPane.add(closeButton); |
