From 3bc19b27ade1b4e6fba5bd4b7b96eae95092d80a Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 13 Jan 2023 18:50:00 +0100 Subject: [PATCH] toString() of enum options: Ensure lowercase --- sop-java/src/main/java/sop/enums/ArmorLabel.java | 8 +++++++- sop-java/src/main/java/sop/enums/EncryptAs.java | 8 +++++++- sop-java/src/main/java/sop/enums/SignAs.java | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sop-java/src/main/java/sop/enums/ArmorLabel.java b/sop-java/src/main/java/sop/enums/ArmorLabel.java index aeaa6f9..bb97e84 100644 --- a/sop-java/src/main/java/sop/enums/ArmorLabel.java +++ b/sop-java/src/main/java/sop/enums/ArmorLabel.java @@ -9,5 +9,11 @@ public enum ArmorLabel { Sig, Key, Cert, - Message + Message, + ; + + @Override + public String toString() { + return super.toString().toLowerCase(); + } } diff --git a/sop-java/src/main/java/sop/enums/EncryptAs.java b/sop-java/src/main/java/sop/enums/EncryptAs.java index 85a2cd7..7e7d4d1 100644 --- a/sop-java/src/main/java/sop/enums/EncryptAs.java +++ b/sop-java/src/main/java/sop/enums/EncryptAs.java @@ -6,5 +6,11 @@ package sop.enums; public enum EncryptAs { Binary, - Text + Text, + ; + + @Override + public String toString() { + return super.toString().toLowerCase(); + } } diff --git a/sop-java/src/main/java/sop/enums/SignAs.java b/sop-java/src/main/java/sop/enums/SignAs.java index f7f3671..1174098 100644 --- a/sop-java/src/main/java/sop/enums/SignAs.java +++ b/sop-java/src/main/java/sop/enums/SignAs.java @@ -13,5 +13,11 @@ public enum SignAs { /** * Signature is made over the message in text mode. */ - Text + Text, + ; + + @Override + public String toString() { + return super.toString().toLowerCase(); + } }