šŸŽØ Remove some unnecessary type parameters
authorDavid ā€˜Bombe’ Roden <bombe@freenetproject.org>
Wed, 17 Dec 2025 17:07:19 +0000 (18:07 +0100)
committerDavid ā€˜Bombe’ Roden <bombe@freenetproject.org>
Wed, 17 Dec 2025 17:07:19 +0000 (18:07 +0100)
src/main/java/net/pterodactylus/fcp/plugin/WebOfTrustPlugin.java

index 28cd9eb..23cc507 100644 (file)
@@ -244,7 +244,7 @@ public class WebOfTrustPlugin {
                if (!replies.get("Message").equals("Identities")) {
                        throw new FcpException("WebOfTrust Plugin did not reply with ā€œIdentitiesā€ message!");
                }
-               Map<Identity, IdentityTrust> identityTrusts = new HashMap<Identity, IdentityTrust>();
+               Map<Identity, IdentityTrust> identityTrusts = new HashMap<>();
                for (int identityIndex = 1; replies.containsKey("Identity" + identityIndex); identityIndex++) {
                        String identifier = replies.get("Identity" + identityIndex);
                        String nickname = replies.get("Nickname" + identityIndex);
@@ -274,7 +274,7 @@ public class WebOfTrustPlugin {
                if (!replies.get("Message").equals("Identities")) {
                        throw new FcpException("WebOfTrust Plugin did not reply with ā€œIdentitiesā€ message!");
                }
-               Map<Identity, IdentityTrust> identityTrusts = new HashMap<Identity, IdentityTrust>();
+               Map<Identity, IdentityTrust> identityTrusts = new HashMap<>();
                for (int identityIndex = 1; replies.containsKey("Identity" + identityIndex); identityIndex++) {
                        String identifier = replies.get("Identity" + identityIndex);
                        String nickname = replies.get("Nickname" + identityIndex);
@@ -423,7 +423,7 @@ public class WebOfTrustPlugin {
         *             of elements
         */
        private Map<String, String> createParameters(String... parameters) throws ArrayIndexOutOfBoundsException {
-               Map<String, String> parameterMap = new HashMap<String, String>();
+               Map<String, String> parameterMap = new HashMap<>();
                for (int index = 0; index < parameters.length; index += 2) {
                        parameterMap.put(parameters[index], parameters[index + 1]);
                }