From 69b9357f5cdf7b90ae1ab2c4451ea5f91352f42e Mon Sep 17 00:00:00 2001 From: Paul Ferraro Date: Thu, 9 May 2024 15:15:03 -0400 Subject: [PATCH] WFCORE-6824 ServiceNameFactory.resolveServiceName(UnaryServiceDescriptor) throws ISE if resolved to a NullaryServiceDescriptor --- .../java/org/jboss/as/controller/ServiceNameFactory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controller/src/main/java/org/jboss/as/controller/ServiceNameFactory.java b/controller/src/main/java/org/jboss/as/controller/ServiceNameFactory.java index 25e243593c0..b3d43dcb757 100644 --- a/controller/src/main/java/org/jboss/as/controller/ServiceNameFactory.java +++ b/controller/src/main/java/org/jboss/as/controller/ServiceNameFactory.java @@ -153,7 +153,10 @@ public static ServiceName resolveServiceName(QuaternaryServiceDescriptor desc } private static ServiceName parseServiceName(Map.Entry resolved) { - return parseServiceName(resolved.getKey()).append(resolved.getValue()); + ServiceName result = parseServiceName(resolved.getKey()); + String[] values = resolved.getValue(); + // ServiceName.append(...) throws an ISE if called with empty array + return (values.length > 0) ? result.append(values) : result; } static void clearCache() {