From ade6057d5ec347d8d7e521ab57fb8d9584e814f3 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Wed, 26 Mar 2025 17:11:30 -0400 Subject: [PATCH] Add jdk21 specific code for testing Signed-off-by: Craig Perkins --- src/main/java/org/opensearch/security/ssl/util/Utils.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/opensearch/security/ssl/util/Utils.java b/src/main/java/org/opensearch/security/ssl/util/Utils.java index 6f2ea9de3f..365f97fa28 100644 --- a/src/main/java/org/opensearch/security/ssl/util/Utils.java +++ b/src/main/java/org/opensearch/security/ssl/util/Utils.java @@ -24,4 +24,12 @@ public class Utils { public static char[] toCharArray(String str) { return Strings.isNullOrEmpty(str) ? null : str.toCharArray(); } + + static String format(Object obj) { + return switch (obj) { + case Integer i -> "int: " + i; + case String s -> "string: " + s; + default -> "unknown"; + }; + } }