You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/01/10 09:29:13 UTC
[camel] branch main updated: CAMEL-18864: java-joor-dsl - Remove method Helper#asClassName (#9026)
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new d08d9dab860 CAMEL-18864: java-joor-dsl - Remove method Helper#asClassName (#9026)
d08d9dab860 is described below
commit d08d9dab860bce5e27f38a302bf97a4e0871dbfe
Author: Nicolas Filotto <es...@users.noreply.github.com>
AuthorDate: Tue Jan 10 10:29:07 2023 +0100
CAMEL-18864: java-joor-dsl - Remove method Helper#asClassName (#9026)
## Motivation
Since `ClassRoutesBuilderLoader` has been removed the method `Helper#asClassName` is no more used and thus can be removed.
## Modifications:
* Remove the useless method `Helper#asClassName`
---
.../java/org/apache/camel/dsl/java/joor/Helper.java | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/dsl/camel-java-joor-dsl/src/main/java/org/apache/camel/dsl/java/joor/Helper.java b/dsl/camel-java-joor-dsl/src/main/java/org/apache/camel/dsl/java/joor/Helper.java
index b2342c6e17c..70ac21efe2d 100644
--- a/dsl/camel-java-joor-dsl/src/main/java/org/apache/camel/dsl/java/joor/Helper.java
+++ b/dsl/camel-java-joor-dsl/src/main/java/org/apache/camel/dsl/java/joor/Helper.java
@@ -22,7 +22,6 @@ import java.util.regex.Pattern;
import org.apache.camel.spi.Resource;
import org.apache.camel.support.ResourceHelper;
import org.apache.camel.util.FileUtil;
-import org.apache.camel.util.StringHelper;
/**
* A helper class allowing to reuse part of the code outside of Camel easily.
@@ -36,23 +35,6 @@ public final class Helper {
}
- /**
- * @return the name of the class according to its location.
- */
- public static String asClassName(Resource resource) {
- String className = resource.getLocation();
- if (className.contains(":")) {
- // remove scheme such as classpath:foo.class
- className = StringHelper.after(className, ":");
- }
- assert className != null;
- className = className.replace('/', '.');
- if (className.endsWith(".class")) {
- className = className.substring(0, className.length() - 6);
- }
- return className;
- }
-
/**
* @return the name of the class according to its location and its source code.
*/