X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FConfigurationSoneParser.java;h=99c1c9d0e6a29733e0fb655852c9518934c5ce24;hb=dc641a05eda529790ef83b9275db6ce2ac71a04f;hp=37e0ed52ea428de941426ab79a26b100785712a3;hpb=c4ae226ec5052116cefc542ae2017036a7bc6332;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/core/ConfigurationSoneParser.java b/src/main/java/net/pterodactylus/sone/core/ConfigurationSoneParser.java
index 37e0ed5..99c1c9d 100644
--- a/src/main/java/net/pterodactylus/sone/core/ConfigurationSoneParser.java
+++ b/src/main/java/net/pterodactylus/sone/core/ConfigurationSoneParser.java
@@ -27,17 +27,15 @@ import net.pterodactylus.util.config.Configuration;
/**
* Parses a {@link Sone}âs data from a {@link Configuration}.
- *
- * @author David âBombeâ Roden
*/
public class ConfigurationSoneParser {
private final Configuration configuration;
private final Sone sone;
private final String sonePrefix;
- private final Map albums = new HashMap();
- private final List topLevelAlbums = new ArrayList();
- private final Map images = new HashMap();
+ private final Map albums = new HashMap<>();
+ private final List topLevelAlbums = new ArrayList<>();
+ private final Map images = new HashMap<>();
public ConfigurationSoneParser(Configuration configuration, Sone sone) {
this.configuration = configuration;
@@ -86,7 +84,7 @@ public class ConfigurationSoneParser {
public Set parsePosts(PostBuilderFactory postBuilderFactory)
throws InvalidPostFound {
- Set posts = new HashSet();
+ Set posts = new HashSet<>();
while (true) {
String postPrefix = "/Posts/" + posts.size();
String postId = getString(postPrefix + "/ID", null);
@@ -123,7 +121,7 @@ public class ConfigurationSoneParser {
public Set parsePostReplies(
PostReplyBuilderFactory postReplyBuilderFactory) {
- Set replies = new HashSet();
+ Set replies = new HashSet<>();
while (true) {
String replyPrefix = "/Replies/" + replies.size();
String replyId = getString(replyPrefix + "/ID", null);
@@ -149,7 +147,7 @@ public class ConfigurationSoneParser {
}
public Set parseLikedPostIds() {
- Set likedPostIds = new HashSet();
+ Set likedPostIds = new HashSet<>();
while (true) {
String likedPostId =
getString("/Likes/Post/" + likedPostIds.size() + "/ID",
@@ -163,7 +161,7 @@ public class ConfigurationSoneParser {
}
public Set parseLikedPostReplyIds() {
- Set likedPostReplyIds = new HashSet();
+ Set likedPostReplyIds = new HashSet<>();
while (true) {
String likedReplyId = getString(
"/Likes/Reply/" + likedPostReplyIds.size() + "/ID", null);
@@ -176,7 +174,7 @@ public class ConfigurationSoneParser {
}
public Set parseFriends() {
- Set friends = new HashSet();
+ Set friends = new HashSet<>();
while (true) {
String friendId =
getString("/Friends/" + friends.size() + "/ID", null);