You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/09/25 08:25:11 UTC

[GitHub] [maven-doxia] hboutemy commented on a diff in pull request #116: [DOXIA-670] Remove code duplication in XdocSink

hboutemy commented on code in PR #116:
URL: https://github.com/apache/maven-doxia/pull/116#discussion_r979373726


##########
doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java:
##########
@@ -505,31 +497,6 @@ public void close()
         init();
     }
 
-    /**
-     * Adds a link with an optional target.
-     *
-     * @param name the link name.
-     * @param target the link target, may be null.
-     */
-    public void link( String name, String target )
-    {
-        if ( isHeadFlag() )
-        {
-            return;
-        }
-
-        MutableAttributeSet att = new SinkEventAttributeSet();
-
-        att.addAttribute( Attribute.HREF, HtmlTools.escapeHTML( name ) );
-
-        if ( target != null )
-        {
-            att.addAttribute( Attribute.TARGET, target );
-        }
-
-        writeStartTag( A, att );
-    }
-

Review Comment:
   it seems that this link(String, String) method is more than "duplicate code": it's dead code that was introduced into Doxia 1.1 and was never called outside the unit test
   then I'm all in to remove this dead code and update the associated unit test, with proper Jira issue renaming
   
   on other changes like VALIGN, that are unrelated to this dead code removal, I'd prefer have a separate commit and review to better understand
   
   and I don't understand why there is a discussion on "source", which seems to be completely an unrelated discussion



-- 
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: issues-unsubscribe@maven.apache.org

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