kwin commented on code in PR #1983:
URL: https://github.com/apache/maven-resolver/pull/1983#discussion_r3795326862


##########
maven-resolver-tools/src/main/java/org/eclipse/aether/tools/ConfigurationCollectorDoclet.java:
##########
@@ -584,81 +700,198 @@ protected String defaultAction(DocTree node, Void p) {
         }
     }
 
-    private String escapeHtml(String text) {
-        return text.replace("&", "&amp;").replace("<", "&lt;").replace(">", 
"&gt;");
+    private static String escape(RenderMode mode, String text) {
+        if (mode == RenderMode.HTML) {
+            return text.replace("&", "&amp;").replace("<", 
"&lt;").replace(">", "&gt;");
+        } else {
+            return text;
+        }
     }
 
-    private String getSince(TypeElement type, DocCommentTree docComment, 
VariableElement fieldContext) {
-        String since = getSinceTag(docComment, fieldContext);
-        if (since == null && type != null) {
+    private Optional<String> getSince(DocTreePath path) {
+        String since = getSinceTag(path);
+        if (since == null) {
             // fall back to the enclosing type's @since
-            since = getSinceTag(docTrees.getDocCommentTree(type), null);
+            DocTreePath parentPath = path.getParentPath();
+            if (parentPath != null) {
+                return getSince(parentPath);

Review Comment:
   Indeed, added a test case and fixed the issue in 
https://github.com/apache/maven-resolver/pull/1983/commits/39dd159af2caeb582624eff4a9744707e7278f70.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to