This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karaf.git
commit 3f9ab747f141babef0af93e98ca44e38ef1f8e19 Author: Claus Ibsen <[email protected]> AuthorDate: Tue Jan 4 06:18:15 2022 +0100 Delete StringHelper#replaceAll and use String#replace instead as it is much faster from Java 11 onward. --- .../org/apache/camel/core/osgi/OsgiManagementNameStrategy.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java b/core/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java index ed16568..80237dc 100644 --- a/core/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java +++ b/core/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiManagementNameStrategy.java @@ -20,7 +20,6 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.camel.CamelContext; import org.apache.camel.impl.engine.DefaultManagementNameStrategy; -import org.apache.camel.util.StringHelper; import org.osgi.framework.BundleContext; /** @@ -59,9 +58,9 @@ public class OsgiManagementNameStrategy extends DefaultManagementNameStrategy { } String version = bundleContext.getBundle().getVersion().toString(); - answer = StringHelper.replaceAll(answer, "#bundleId#", bundleId); - answer = StringHelper.replaceAll(answer, "#symbolicName#", symbolicName); - answer = StringHelper.replaceAll(answer, "#version#", version); + answer = answer.replace("#bundleId#", bundleId); + answer = answer.replace("#symbolicName#", symbolicName); + answer = answer.replace("#version#", version); // we got a candidate then find a free name // true = check fist if the candidate as-is is free, if not then use the counter
