Skip to content

Commit

Permalink
Merge pull request #45777 from rsvoboda/drop.StringUtil.join
Browse files Browse the repository at this point in the history
Drop public usage of StringUtil#join, deprecated since 2019
  • Loading branch information
gsmet authored Jan 22, 2025
2 parents 17be927 + ac05b99 commit 4198ee4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> it) {
private static String join(String delim, Iterator<String> it) {
final StringBuilder b = new StringBuilder();
if (it.hasNext()) {
b.append(it.next());
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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<String>) () -> withoutSuffix(lowerCase(camelHumpsIterator(simpleName)), "config", "configuration",
"properties", "props"));
}

Expand Down

0 comments on commit 4198ee4

Please sign in to comment.