Skip to content

Commit

Permalink
Merge pull request #1968 from srishtih/2.x
Browse files Browse the repository at this point in the history
ELY-2616: Replacing switch statement by if statements to increase readability
  • Loading branch information
Skyllarr authored Sep 22, 2023
2 parents a7a0b99 + 6c3bb4d commit 37dc8b3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 37dc8b3

Please sign in to comment.