From 3e453612b8d9f8bf1a66e6745558abb5526caaba Mon Sep 17 00:00:00 2001 From: Sebastian Reddig <54644983+sgcr@users.noreply.github.com> Date: Fri, 16 Aug 2024 23:57:39 +0200 Subject: [PATCH] refactor: removing unnecessary semicolons (#2110) Co-authored-by: Sebastian Reddig --- src/main/java/core/constants/TeamSpirit.java | 4 ++-- src/main/java/core/constants/TrainingType.java | 2 +- src/main/java/core/file/ExampleFileFilter.java | 2 -- src/main/java/core/file/xml/XMLAvatarsParser.java | 2 +- src/main/java/core/file/xml/XMLCHPPPreParser.java | 2 +- src/main/java/core/gui/LookAndFeelDialog.java | 2 +- src/main/java/core/model/match/IMatchType.java | 2 +- src/main/java/core/util/OSUtils.java | 2 +- src/main/java/module/ifa/gif/GIFEncoder.java | 3 ++- .../substitution/positionchooser/PositionSelectionEvent.java | 4 ++-- .../java/module/teamAnalyzer/ui/component/FavouriteMenu.java | 2 -- src/main/java/module/training/ui/model/ModelChange.java | 4 ++-- src/main/java/tool/arenasizer/ControlPanel.java | 2 +- 13 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/main/java/core/constants/TeamSpirit.java b/src/main/java/core/constants/TeamSpirit.java index 06dc00e00..45ca20a37 100644 --- a/src/main/java/core/constants/TeamSpirit.java +++ b/src/main/java/core/constants/TeamSpirit.java @@ -31,10 +31,10 @@ public final class TeamSpirit { new CBItem(HOVerwaltung.instance().getLanguageString("ls.team.teamspirit.paradiseonearth"), PARADISE_ON_EARTH) }; private TeamSpirit() { - }; + } - public static String toString(int teamSpirit){ + public static String toString(int teamSpirit){ if(teamSpirit >= LIKE_THE_COLD_WAR && teamSpirit <= PARADISE_ON_EARTH) return ITEMS[teamSpirit].getText(); else diff --git a/src/main/java/core/constants/TrainingType.java b/src/main/java/core/constants/TrainingType.java index e35fb559c..e8f4ae89a 100644 --- a/src/main/java/core/constants/TrainingType.java +++ b/src/main/java/core/constants/TrainingType.java @@ -31,7 +31,7 @@ public final class TrainingType { new CBItem(Helper.getTranslation("ls.team.trainingtype.wingattacks"), WING_ATTACKS) }; - private TrainingType(){}; + private TrainingType(){} public static String toString(int trainingType){ if(trainingType >= SET_PIECES && trainingType <= WING_ATTACKS) diff --git a/src/main/java/core/file/ExampleFileFilter.java b/src/main/java/core/file/ExampleFileFilter.java index f875eafb1..ec7648ba6 100644 --- a/src/main/java/core/file/ExampleFileFilter.java +++ b/src/main/java/core/file/ExampleFileFilter.java @@ -190,7 +190,6 @@ public final String getExtension(File f) { return filename.substring(i + 1).toLowerCase(java.util.Locale.ENGLISH); } - ; } return null; @@ -240,7 +239,6 @@ public final boolean accept(File f) { return true; } - ; } return false; diff --git a/src/main/java/core/file/xml/XMLAvatarsParser.java b/src/main/java/core/file/xml/XMLAvatarsParser.java index a79eb1ddc..b32973e3d 100644 --- a/src/main/java/core/file/xml/XMLAvatarsParser.java +++ b/src/main/java/core/file/xml/XMLAvatarsParser.java @@ -27,7 +27,7 @@ public static List parseAvatarsFromString(String str) { private static List parseDetails(Document doc) { - List playerAvatars = new ArrayList<>();; + List playerAvatars = new ArrayList<>(); if (doc == null) { return playerAvatars; diff --git a/src/main/java/core/file/xml/XMLCHPPPreParser.java b/src/main/java/core/file/xml/XMLCHPPPreParser.java index 150dd46ef..377c9e700 100644 --- a/src/main/java/core/file/xml/XMLCHPPPreParser.java +++ b/src/main/java/core/file/xml/XMLCHPPPreParser.java @@ -17,7 +17,7 @@ public static String getError(String xmlIn) { String sReturnError = ""; final HOVerwaltung hov = HOVerwaltung.instance(); if(xmlIn.length() > 0 ) { - Document doc = XMLManager.parseString(xmlIn);; + Document doc = XMLManager.parseString(xmlIn); if (doc != null) { Element ele = null; Element root = doc.getDocumentElement(); diff --git a/src/main/java/core/gui/LookAndFeelDialog.java b/src/main/java/core/gui/LookAndFeelDialog.java index ea05b3ae4..ff06f6702 100644 --- a/src/main/java/core/gui/LookAndFeelDialog.java +++ b/src/main/java/core/gui/LookAndFeelDialog.java @@ -53,7 +53,7 @@ private static LinkedHashMap getLookAndFeelOverview() { * * @return A sorted collection of all Look and Feel keys. */ - private static Collection getLookAndFeelKeys() { ; + private static Collection getLookAndFeelKeys() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); return defaults.keySet().stream().map(Object::toString).sorted().collect(Collectors.toList()); } diff --git a/src/main/java/core/model/match/IMatchType.java b/src/main/java/core/model/match/IMatchType.java index 79dd679c9..344d5735c 100644 --- a/src/main/java/core/model/match/IMatchType.java +++ b/src/main/java/core/model/match/IMatchType.java @@ -13,7 +13,7 @@ public interface IMatchType { default Icon getIcon(){ return ThemeManager.getIcon(HOIconName.MATCHICONS[this.getIconArrayIndex()]) ; - }; + } String getName(); default boolean isCompetitive() { diff --git a/src/main/java/core/util/OSUtils.java b/src/main/java/core/util/OSUtils.java index 8cf691062..43cde03b4 100644 --- a/src/main/java/core/util/OSUtils.java +++ b/src/main/java/core/util/OSUtils.java @@ -5,7 +5,7 @@ */ public final class OSUtils { public final static String OS_NAME = System.getProperty("os.name").toLowerCase(); - public enum OS {WINDOWS, LINUX, MAC}; + public enum OS {WINDOWS, LINUX, MAC} private static OS os = determineOS(); public static OS getOS() {return os;} diff --git a/src/main/java/module/ifa/gif/GIFEncoder.java b/src/main/java/module/ifa/gif/GIFEncoder.java index 79132a005..385554e8b 100644 --- a/src/main/java/module/ifa/gif/GIFEncoder.java +++ b/src/main/java/module/ifa/gif/GIFEncoder.java @@ -79,7 +79,8 @@ public GIFEncoder(Image image) throws AWTException { throw new AWTException("Grabber returned false: " + grabber.status()); } - catch (InterruptedException e) { ; } + catch (InterruptedException e) { + } byte r[][] = new byte[width_][height_]; byte g[][] = new byte[width_][height_]; diff --git a/src/main/java/module/lineup/substitution/positionchooser/PositionSelectionEvent.java b/src/main/java/module/lineup/substitution/positionchooser/PositionSelectionEvent.java index 9ea65e68f..d30e4b78f 100644 --- a/src/main/java/module/lineup/substitution/positionchooser/PositionSelectionEvent.java +++ b/src/main/java/module/lineup/substitution/positionchooser/PositionSelectionEvent.java @@ -6,8 +6,8 @@ public class PositionSelectionEvent { private Change change; public enum Change { - SELECTED, DESELECTED; - } + SELECTED, DESELECTED + } public PositionSelectionEvent(Integer position, Change change) { this.position = position; diff --git a/src/main/java/module/teamAnalyzer/ui/component/FavouriteMenu.java b/src/main/java/module/teamAnalyzer/ui/component/FavouriteMenu.java index e9c389ff1..283a6df67 100644 --- a/src/main/java/module/teamAnalyzer/ui/component/FavouriteMenu.java +++ b/src/main/java/module/teamAnalyzer/ui/component/FavouriteMenu.java @@ -91,7 +91,6 @@ private void jbInit() { + " " + HOVerwaltung.instance().getLanguageString("Verein"), JOptionPane.PLAIN_MESSAGE); - ; }); itemAdd.addActionListener(arg0 -> { @@ -101,7 +100,6 @@ private void jbInit() { + " " + HOVerwaltung.instance().getLanguageString("Verein"), JOptionPane.PLAIN_MESSAGE); - ; }); } } diff --git a/src/main/java/module/training/ui/model/ModelChange.java b/src/main/java/module/training/ui/model/ModelChange.java index fefd30ba0..37883ec0c 100644 --- a/src/main/java/module/training/ui/model/ModelChange.java +++ b/src/main/java/module/training/ui/model/ModelChange.java @@ -5,6 +5,6 @@ public enum ModelChange { ACTIVE_PLAYER, NUMBER_OF_CO_TRAINERS, TRAINER_LEVEL, - FUTURE_TRAINING; - + FUTURE_TRAINING + } diff --git a/src/main/java/tool/arenasizer/ControlPanel.java b/src/main/java/tool/arenasizer/ControlPanel.java index 00283cd02..82a10217c 100644 --- a/src/main/java/tool/arenasizer/ControlPanel.java +++ b/src/main/java/tool/arenasizer/ControlPanel.java @@ -210,7 +210,7 @@ int[] getModifiedSupporter(){ @Override public void actionPerformed(java.awt.event.ActionEvent actionEvent) { - BigDecimal groesse = BigDecimal.ZERO;; + BigDecimal groesse = BigDecimal.ZERO; try { groesse = new BigDecimal(Integer.parseInt(m_jtfGesamtgroesse.getText()));