Skip to content

Commit 7e1161c

Browse files
committed
Sonar
1 parent d5f6404 commit 7e1161c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

core/src/main/java/com/javadiscord/jdi/internal/ReflectiveLoader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
import java.lang.reflect.Proxy;
55

66
public class ReflectiveLoader {
7+
private ReflectiveLoader() {
8+
throw new UnsupportedOperationException("Utility class");
9+
}
10+
711
public static <T> T proxy(Object object, Class<T> interfaceClass) {
812
InvocationHandler handler =
913
(proxy, method, methodArgs) -> object.getClass()

example/lj-discord-bot/src/main/java/com/javadiscord/bot/commands/text/TextCommandRepository.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
public class TextCommandRepository {
99
private static final Map<String, TextCommand> COMMANDS = new HashMap<>();
10-
1110
static {
1211
COMMANDS.put("clear", new ClearChannelCommand());
1312
COMMANDS.put("mute", new MuteCommand());
@@ -16,6 +15,10 @@ public class TextCommandRepository {
1615
COMMANDS.put("embed", new SayEmbedCommand());
1716
}
1817

18+
private TextCommandRepository() {
19+
throw new UnsupportedOperationException("Utility class");
20+
}
21+
1922
public static TextCommand get(String key) {
2023
return COMMANDS.get(key);
2124
}

0 commit comments

Comments
 (0)