RuntimeException -> IllegalStateException

This commit is contained in:
AlexProgrammerDE 2024-02-25 07:50:58 +01:00
parent 8794fd857c
commit ea0e323aaf
3 changed files with 3 additions and 3 deletions
protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet

View file

@ -56,7 +56,7 @@ public class ClientboundPlayerInfoUpdatePacket implements MinecraftPacket {
try {
publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(keyBytes));
} catch (GeneralSecurityException e) {
throw new RuntimeException("Could not decode public key.", e);
throw new IllegalStateException("Could not decode public key.", e);
}
entry.setPublicKey(publicKey);

View file

@ -31,7 +31,7 @@ public class ServerboundChatSessionUpdatePacket implements MinecraftPacket {
try {
publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(keyBytes));
} catch (GeneralSecurityException e) {
throw new RuntimeException("Could not decode public key.", e);
throw new IllegalStateException("Could not decode public key.", e);
}
this.publicKey = publicKey;

View file

@ -28,7 +28,7 @@ public class ClientboundHelloPacket implements MinecraftPacket {
try {
this.publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(publicKey));
} catch (GeneralSecurityException e) {
throw new RuntimeException("Could not decode public key.", e);
throw new IllegalStateException("Could not decode public key.", e);
}
}