diff --git a/core/runtime/src/main/java/io/quarkus/runtime/util/StringUtil.java b/core/runtime/src/main/java/io/quarkus/runtime/util/StringUtil.java index e3bb032289536..52e33c76b2d50 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/util/StringUtil.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/util/StringUtil.java @@ -112,13 +112,13 @@ public String next() { } /** - * @deprecated Use {@link String#join} instead. + * Dropped for public usage, kept in place for usage by hyphenate method to avoid need for lambda + * * @param delim delimiter * @param it iterator * @return the joined string */ - @Deprecated - public static String join(String delim, Iterator it) { + private static String join(String delim, Iterator it) { final StringBuilder b = new StringBuilder(); if (it.hasNext()) { b.append(it.next()); diff --git a/extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ConfigurationPropertiesMetadataBuildItem.java b/extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ConfigurationPropertiesMetadataBuildItem.java index a7c67705c86e4..4e1549f6be0ca 100644 --- a/extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ConfigurationPropertiesMetadataBuildItem.java +++ b/extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ConfigurationPropertiesMetadataBuildItem.java @@ -1,7 +1,6 @@ package io.quarkus.spring.boot.properties.deployment; import static io.quarkus.runtime.util.StringUtil.camelHumpsIterator; -import static io.quarkus.runtime.util.StringUtil.join; import static io.quarkus.runtime.util.StringUtil.lowerCase; import static io.quarkus.runtime.util.StringUtil.withoutSuffix; @@ -67,11 +66,10 @@ private String sanitisePrefix(String prefix) { return prefix; } - @SuppressWarnings("deprecation") private String getPrefixFromClassName(DotName className) { String simpleName = className.isInner() ? className.local() : className.withoutPackagePrefix(); - return join("-", - withoutSuffix(lowerCase(camelHumpsIterator(simpleName)), "config", "configuration", + return String.join("-", + (Iterable) () -> withoutSuffix(lowerCase(camelHumpsIterator(simpleName)), "config", "configuration", "properties", "props")); }