diff --git a/src/main/java/core/net/OnlineWorker.java b/src/main/java/core/net/OnlineWorker.java index 202ce79f4..ae2f11df3 100644 --- a/src/main/java/core/net/OnlineWorker.java +++ b/src/main/java/core/net/OnlineWorker.java @@ -805,7 +805,7 @@ private static Matchdetails downloadMatchDetails(int matchID, MatchType matchTyp } String arenaString = MyConnector.instance().downloadArena(details.getArenaID()); HOMainFrame.instance().setWaitInformation(); - details.setRegionId(XMLArenaParser.parseArenaFromString(arenaString).getRight().getRegion().getId()); + details.setRegionId(XMLArenaParser.parseArenaFromString(arenaString).getRight().getRegion().id()); } catch (Exception e) { String msg = getLangString("Downloadfehler") + ": Error fetching Matchdetails XML.: "; // Info diff --git a/src/main/java/hattrickdata/HattrickDataInfo.java b/src/main/java/hattrickdata/HattrickDataInfo.java index a56b4efc2..5b5e437a3 100644 --- a/src/main/java/hattrickdata/HattrickDataInfo.java +++ b/src/main/java/hattrickdata/HattrickDataInfo.java @@ -1,19 +1,11 @@ package hattrickdata; import core.util.HODateTime; -import lombok.*; -import lombok.experimental.SuperBuilder; +import lombok.Builder; -@Getter -@SuperBuilder -@AllArgsConstructor -@NoArgsConstructor -@EqualsAndHashCode -@ToString -public class HattrickDataInfo { - - private String fileName; - private String version; - private int userId; - private HODateTime fetchedDate; +@Builder +public record HattrickDataInfo(String fileName, + String version, + int userId, + HODateTime fetchedDate) { } diff --git a/src/main/java/hattrickdata/League.java b/src/main/java/hattrickdata/League.java index a83ead13e..a44a65e06 100644 --- a/src/main/java/hattrickdata/League.java +++ b/src/main/java/hattrickdata/League.java @@ -1,18 +1,7 @@ package hattrickdata; -import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -@Getter @Builder -@AllArgsConstructor -@EqualsAndHashCode -@ToString -public class League { - - private int id; - private String name; +public record League(int id, String name) { } diff --git a/src/main/java/hattrickdata/Region.java b/src/main/java/hattrickdata/Region.java index 5d06dc1c6..39c8fe177 100644 --- a/src/main/java/hattrickdata/Region.java +++ b/src/main/java/hattrickdata/Region.java @@ -1,18 +1,7 @@ package hattrickdata; -import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -@Getter @Builder -@AllArgsConstructor -@EqualsAndHashCode -@ToString -public class Region { - - private int id; - private String name; +public record Region(int id, String name) { } diff --git a/src/main/java/hattrickdata/Team.java b/src/main/java/hattrickdata/Team.java index b24051920..1e66d59ea 100644 --- a/src/main/java/hattrickdata/Team.java +++ b/src/main/java/hattrickdata/Team.java @@ -1,18 +1,7 @@ package hattrickdata; -import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.ToString; -@Getter @Builder -@AllArgsConstructor -@EqualsAndHashCode -@ToString -public class Team { - - private int id; - private String name; +public record Team(int id, String name) { }