You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/10/09 17:49:28 UTC

[GitHub] [camel] davsclaus commented on a change in pull request #4410: CAMEL-15666: Fix PackageDataFormatMojo handling of classes with generic types

davsclaus commented on a change in pull request #4410:
URL: https://github.com/apache/camel/pull/4410#discussion_r502584910



##########
File path: tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
##########
@@ -515,7 +515,7 @@ private static String schemaSubDirectory(String javaType) {
     private Optional<JavaClassSource> doParseJavaClassSource(String className) {
         try {
             Path srcDir = project.getBasedir().toPath().resolve("src/main/java");
-            Path file = srcDir.resolve(className.replace('.', '/') + ".java");
+            Path file = srcDir.resolve(className.replaceAll("<.*>", "").replace('.', '/') + ".java");

Review comment:
       Great catch. I wonder if you could add a code comment above this why you are doing this reg exp replaceAll - as when we look at this code in 6 month or later then we wouldnt remember why.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org