[
https://issues.apache.org/jira/browse/MPLUGIN-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842963#comment-17842963
]
ASF GitHub Bot commented on MPLUGIN-521:
----------------------------------------
michael-o commented on code in PR #281:
URL:
https://github.com/apache/maven-plugin-tools/pull/281#discussion_r1587606761
##########
maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java:
##########
@@ -637,10 +637,10 @@ static URI getJavadocUrlForType(JavadocLinkGenerator
javadocLinkGenerator, Strin
.split(",\\s*");
switch (parameterTypes.length) {
case 1: // if only one parameter type, assume collection,
first parameter type is most interesting
- binaryName = parameterTypes[0];
+ binaryName =
extractbinaryNameForJavadoc(parameterTypes[0]);
break;
case 2: // if two parameter types assume map, second parameter
type is most interesting
- binaryName = parameterTypes[1];
+ binaryName =
extractbinaryNameForJavadoc(parameterTypes[1]);
Review Comment:
```suggestion
binaryName =
extractBinaryNameForJavadoc(parameterTypes[1]);
```
##########
maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java:
##########
@@ -637,10 +637,10 @@ static URI getJavadocUrlForType(JavadocLinkGenerator
javadocLinkGenerator, Strin
.split(",\\s*");
switch (parameterTypes.length) {
case 1: // if only one parameter type, assume collection,
first parameter type is most interesting
- binaryName = parameterTypes[0];
+ binaryName =
extractbinaryNameForJavadoc(parameterTypes[0]);
Review Comment:
```suggestion
binaryName =
extractBinaryNameForJavadoc(parameterTypes[0]);
```
##########
maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java:
##########
@@ -649,7 +649,11 @@ static URI getJavadocUrlForType(JavadocLinkGenerator
javadocLinkGenerator, Strin
} else {
binaryName = type;
}
- return javadocLinkGenerator.createLink(binaryName);
+ return binaryName;
+ }
+
+ static URI getJavadocUrlForType(JavadocLinkGenerator javadocLinkGenerator,
String type) {
+ return
javadocLinkGenerator.createLink(extractbinaryNameForJavadoc(type));
Review Comment:
```suggestion
return
javadocLinkGenerator.createLink(extractBinaryNameForJavadoc(type));
```
> Nested types not properly extracted cause exception while generating Javadoc
> URLs
> ---------------------------------------------------------------------------------
>
> Key: MPLUGIN-521
> URL: https://issues.apache.org/jira/browse/MPLUGIN-521
> Project: Maven Plugin Tools
> Issue Type: Bug
> Components: Plugin Plugin
> Affects Versions: 3.12.0
> Reporter: Michael Osipov
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 3.12.1
>
>
> Details:
> https://github.com/apache/maven-site-plugin/pull/177#pullrequestreview-2033188399
> If you have a type like {{Map<String, List<Foo>>}} the generator will extract
> {{List<Foo>}} instead of just {{Foo}}. We should recursively go down to the
> type.
> This is likely an edge case.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)