From 6c3bb4d85420ce978deeb551b287c78bb5c1f0b5 Mon Sep 17 00:00:00 2001 From: srishti Date: Fri, 22 Sep 2023 14:34:30 -0700 Subject: [PATCH] ELY-2616: Replace this switch statement by if statements to increase readability --- .../credential/store/impl/VaultObjectInputStream.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/credential/store/src/main/java/org/wildfly/security/credential/store/impl/VaultObjectInputStream.java b/credential/store/src/main/java/org/wildfly/security/credential/store/impl/VaultObjectInputStream.java index c71e9202ee2..566a144e16c 100644 --- a/credential/store/src/main/java/org/wildfly/security/credential/store/impl/VaultObjectInputStream.java +++ b/credential/store/src/main/java/org/wildfly/security/credential/store/impl/VaultObjectInputStream.java @@ -31,9 +31,10 @@ final class VaultObjectInputStream extends ObjectInputStream { protected Class resolveClass(final ObjectStreamClass desc) throws IOException, ClassNotFoundException { final String name = desc.getName(); - switch (name) { - case SecurityVaultData.PICKETBOX_CLASS_NAME: return SecurityVaultData.class; - default: return super.resolveClass(desc); + if (name.equals(SecurityVaultData.PICKETBOX_CLASS_NAME)) { + return SecurityVaultData.class; + } else { + return super.resolveClass(desc); } } }