[Git][java-team/libhtmlparser-java][master] 4 commits: Fix FTBFS with Java 10 and drop obselete Taglet code which was removed

Markus Koschany gitlab at salsa.debian.org
Thu May 3 20:29:55 BST 2018


Markus Koschany pushed to branch master at Debian Java Maintainers / libhtmlparser-java


Commits:
89f9fbd4 by Markus Koschany at 2018-05-03T21:10:44+02:00
Fix FTBFS with Java 10 and drop obselete Taglet code which was removed

upstream.

- - - - -
71c50ebb by Markus Koschany at 2018-05-03T21:14:57+02:00
Update changelog

- - - - -
a2479103 by Markus Koschany at 2018-05-03T21:23:53+02:00
Fix Lintian warning privacy-breach.

- - - - -
f28b02ca by Markus Koschany at 2018-05-03T21:24:05+02:00
Declare compliance with Debian Policy 4.1.4.

- - - - -


5 changed files:

- debian/changelog
- debian/control
- + debian/patches/java10.patch
- + debian/patches/privacy-breach.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+libhtmlparser-java (1.6.20060610.dfsg0-9) unstable; urgency=medium
+
+  * Team upload.
+  * Fix FTBFS with Java 10 and drop obsolete Taglet code which was removed
+    upstream. (Closes: #897490)
+  * Fix Lintian warning privacy-breach.
+
+ -- Markus Koschany <apo at debian.org>  Thu, 03 May 2018 21:11:19 +0200
+
 libhtmlparser-java (1.6.20060610.dfsg0-8) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends:
  debhelper (>= 11),
  default-jdk,
  javahelper
-Standards-Version: 4.1.3
+Standards-Version: 4.1.4
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/libhtmlparser-java.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/libhtmlparser-java.git
 Homepage: http://htmlparser.sourceforge.net


=====================================
debian/patches/java10.patch
=====================================
--- /dev/null
+++ b/debian/patches/java10.patch
@@ -0,0 +1,310 @@
+From: Markus Koschany <apo at debian.org>
+Date: Thu, 3 May 2018 21:10:17 +0200
+Subject: java10
+
+---
+ src/build.xml                 |  10 +-
+ src/resources/HtmlTaglet.java | 240 ------------------------------------------
+ 2 files changed, 3 insertions(+), 247 deletions(-)
+ delete mode 100644 src/resources/HtmlTaglet.java
+
+diff --git a/src/build.xml b/src/build.xml
+index 79d34b5..b69e532 100644
+--- a/src/build.xml
++++ b/src/build.xml
+@@ -446,7 +446,7 @@ Update the Web Site
+   <!-- Create the javadoc for the project -->
+   <target name="javadoc" depends="JDK_OK,JDK_Warning,init" description="create JavaDoc (API) documentation">
+     <mkdir dir="${classes}"/>
+-    <javac srcdir="${resources}" includes="HtmlTaglet.java"
++    <javac srcdir="${resources}"
+         classpath="${classes}" encoding="iso-8859-1"/>
+     <mkdir dir="${docs}/javadoc"/>
+     <property name="javadoc.doctitle" value="HTML Parser ${versionNumber}"/>
+@@ -471,7 +471,6 @@ Update the Web Site
+       <header>${javadoc.header}</header>
+       <bottom>${javadoc.bottom}</bottom>
+       <footer>${javadoc.footer}</footer>
+-      <taglet name="HtmlTaglet" path="${resources}:${classes}"/>
+       <group title="Main Package" packages="org.htmlparser"/>
+       <group title="Example Applications" packages="org.htmlparser.parserapplications,org.htmlparser.lexerapplications.tabby,org.htmlparser.lexerapplications.thumbelina,org.htmlparser.parserapplications.filterbuilder*"/>
+       <group title="Nodes" packages="org.htmlparser.nodes,org.htmlparser.tags"/>
+@@ -486,21 +485,19 @@ Update the Web Site
+       <link href="http://www.saxproject.org/apidoc/"/>
+     </javadoc>
+     <copy file="${resources}/inherit.gif" tofile="${docs}/javadoc/resources/inherit.gif" overwrite="true"/>
+-    <delete file="${resources}/HtmlTaglet.class"/>
+   </target>
+ 
+     <!-- Create the javadoc for the project -->
+   <target name="checkjavadoc" depends="JDK_OK,JDK_Warning,init" description="create JavaDoc (API) documentation">
+     <mkdir dir="${classes}"/>
+-    <javac srcdir="${resources}" includes="HtmlTaglet.java"
++    <javac srcdir="${resources}"
+         classpath="${classes}" encoding="iso-8859-1"/>
+     <mkdir dir="${docs}/checkjavadoc"/>
+     <property name="javadoc.doctitle" value="HTML Parser ${versionNumber}"/>
+     <property name="javadoc.header" value="<A HREF="http://htmlparser.sourceforge.net" target="_top">HTML Parser Home Page</A>"/>
+     <property name="javadoc.footer" value="&copy; 2005 Derrick Oswald<div align="right">${TODAY_STRING}</div>"/>
+     <property name="javadoc.bottom" value=""/>
+-    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
+-           docletpath="/home/derrick/htmlparser_cvs/htmlparser/doccheck1.2b2/doccheck.jar"
++    <javadoc
+            packagenames="org.htmlparser.*"
+            sourcepath="${src}"
+            classpath="${classes}"
+@@ -512,7 +509,6 @@ Update the Web Site
+            overview="${src}/doc-files/overview.html">
+     </javadoc>
+     <copy file="${resources}/inherit.gif" tofile="${docs}/javadoc/resources/inherit.gif" overwrite="true"/>
+-    <delete file="${resources}/HtmlTaglet.class"/>
+   </target>
+   
+   <target name="release" depends="jar,thumbelina,filterbuilder,javadoc" description="prepare the release files">
+diff --git a/src/resources/HtmlTaglet.java b/src/resources/HtmlTaglet.java
+deleted file mode 100644
+index ab1fc15..0000000
+--- a/src/resources/HtmlTaglet.java
++++ /dev/null
+@@ -1,240 +0,0 @@
+-// HTMLParser Library $Name: v1_6 $ - A java-based parser for HTML
+-// http://sourceforge.org/projects/htmlparser
+-// Copyright (C) 2003 Derrick Oswald
+-//
+-// Revision Control Information
+-//
+-// $Source: /cvsroot/htmlparser/htmlparser/resources/HtmlTaglet.java,v $
+-// $Author: derrickoswald $
+-// $Date: 2003/12/16 02:29:56 $
+-// $Revision: 1.1 $
+-//
+-// This library is free software; you can redistribute it and/or
+-// modify it under the terms of the GNU Lesser General Public
+-// License as published by the Free Software Foundation; either
+-// version 2.1 of the License, or (at your option) any later version.
+-//
+-// This library is distributed in the hope that it will be useful,
+-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-// Lesser General Public License for more details.
+-//
+-// You should have received a copy of the GNU Lesser General Public
+-// License along with this library; if not, write to the Free Software
+-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-//
+-
+-import com.sun.tools.doclets.Taglet;
+-import com.sun.javadoc.*;
+-import java.util.Map;
+-import org.htmlparser.util.Translate;
+-
+-/**
+- * A JavaDoc Taglet that encodes HTML.
+- * This inline <A href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/taglet/com/sun/tools/doclets/Taglet.html">taglet</A>
+- * converts HTML into character references for embedding into
+- * <A href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/index.html">Javadocs</A>.
+- * For example, it converts <html> into &lt;html&gt;.
+- * Typical usage is to embed an example stream of html into the javadoc for
+- * a class or method:
+- * <pre><font color="green">
+- * /**
+- *  * Gather DIV elements.
+- *  * This method takes {@.html <div></div>} pairs and
+- *  * constructs nested ...
+- * </font></pre>
+- * This is useful so that the documentation is readable while coding and when
+- * presented in the generated javadocs. Normally, embedding HTML in the
+- * javadoc documentation requires the use of character entity references,
+- * otherwise the HTML is interpreted by the javadoc tool and is stripped out.
+- * The programmer can manually embed the character translations to pass the
+- * HTML through, but the resultant comment is extremely hard to read and
+- * understand when editing the code directly. Plus there is the added
+- * possibility of an incorrect encoding because of the manual step.<p>
+- * The use of this taglet requires a 1.4.x or higher JDK, but it is not
+- * expected that users with older JDKs will be generating javadocs when they
+- * are provided in the distribution.<p>
+- * The name was supposed to be "html", but a warning message is generated
+- * by the javadoc tool if a custom tag name doesn't contain any dots. So the
+- * next best name ".html" is used instead, with a passing resemblance to
+- * directives in nroff.
+- */
+-public class HtmlTaglet implements Taglet
+-{
+-    private static final String NAME = ".html";
+-
+-    /**
+-     * Construct a taglet for encoding HTML in doc comments.
+-     */
+-    public HtmlTaglet ()
+-    {
+-    }
+-    
+-    /**
+-     * Return the name of this custom taglet.
+-     */
+-    public String getName ()
+-    {
+-        return (NAME);
+-    }
+-    
+-    /**
+-     * Will return true since <code>{@.html}</code>
+-     * can be used in field documentation.
+-     * @return <code>true</code> since <code>{@.html}</code>
+-     * can be used in field documentation.
+-     */
+-    public boolean inField ()
+-    {
+-        return (true);
+-    }
+-    
+-    /**
+-     * Will return true since <code>{@.html}</code>
+-     * can be used in constructor documentation.
+-     * @return <code>true</code> since <code>{@.html}</code>
+-     * can be used in constructor documentation.
+-     */
+-    public boolean inConstructor ()
+-    {
+-        return (true);
+-    }
+-    
+-    /**
+-     * Will return true since <code>{@.html}</code>
+-     * can be used in method documentation.
+-     * @return <code>true</code> since <code>{@.html}</code>
+-     * can be used in method documentation.
+-     */
+-    public boolean inMethod ()
+-    {
+-        return (true);
+-    }
+-    
+-    /**
+-     * Will return true since <code>{@.html}</code>
+-     * can be used in method documentation.
+-     * @return <code>true</code> since <code>{@.html}</code>
+-     * can be used in overview documentation.
+-     */
+-    public boolean inOverview ()
+-    {
+-        return (true);
+-    }
+-    
+-    /**
+-     * Will return true since <code>{@.html}</code>
+-     * can be used in package documentation.
+-     * @return <code>true</code> since <code>{@.html}</code>
+-     * can be used in package documentation.
+-     */
+-    public boolean inPackage ()
+-    {
+-        return (true);
+-    }
+-    
+-    /**
+-     * Will return true since <code>{@.html}</code>
+-     * can be used in type documentation (classes or interfaces).
+-     * @return true since <code>{@.html}</code>
+-     * can be used in type documentation.
+-     */
+-    public boolean inType ()
+-    {
+-        return (true);
+-    }
+-    
+-    /**
+-     * Will return true since <code>{@.html}</code>
+-     * is an inline tag.
+-     * @return <code>true</code> since <code>{@.html}</code>
+-     * is an inline tag.
+-     */
+-    
+-    public boolean isInlineTag ()
+-    {
+-        return (true);
+-    }
+-    
+-    /**
+-     * Register this Taglet.
+-     * @param tagletMap  the map to register this tag to.
+-     */
+-    public static void register (Map tagletMap)
+-    {
+-        HtmlTaglet tag = new HtmlTaglet ();
+-        tagletMap.put (tag.getName (), tag);
+-    }
+-
+-    /**
+-     * Format the given string to appear "as is" within a JavaDoc comment.
+-     * This method is more complicated than it needs to be, since you might
+-     * say why not just use PRE tags surrounding the text. Unfortunately, PRE
+-     * is a block level tag that breaks the flow of text, preventing inline
+-     * operation. Instead we manually format the whitespace (actually just
+-     * spaces and newlines) within the string to preserve the format.
+-     */
+-    protected String format (String s)
+-    {
+-        int base;
+-        int offset;
+-        StringBuffer ret;
+-
+-        ret = new StringBuffer (512);
+-        
+-        base = 0;
+-        offset = 0;
+-        while (-1 != (offset = s.indexOf ('\n', base)))
+-        {
+-            ret.append (Translate.encode (s.substring (base, offset)));
+-            ret.append ("<br>\n");
+-            base = offset + 1;
+-        }
+-        if (base != s.length ())
+-            ret.append (Translate.encode (s.substring (base)));
+-        
+-        s = ret.toString ();
+-        ret.setLength (0);
+-        for (int i = 0; i < s.length (); i++)
+-            if (' ' == s.charAt (i))
+-                ret.append (" ");
+-            else
+-                ret.append (s.charAt (i));
+-            
+-        return (ret.toString ());
+-    }
+-
+-    /**
+-     * Given the <code>Tag</code> representation of this custom
+-     * tag, return its string representation.
+-     * @param tag   the <code>Tag</code> representation of this custom tag.
+-     */
+-    public String toString (Tag tag)
+-    {
+-        return (format (tag.text ()));
+-    }
+-    
+-    /**
+-     * Given an array of <code>Tag</code>s representing this custom
+-     * tag, return its string representation.
+-     * @param tags  the array of <code>Tag</code>s representing of this custom tag.
+-     */
+-    public String toString(Tag[] tags)
+-    {
+-        StringBuffer ret;
+-
+-        if (0 == tags.length)
+-            return (null);
+-        else
+-        {
+-            ret = new StringBuffer (512);
+-            for (int i = 0; i < tags.length; i++)
+-            {
+-                if (i > 0)
+-                    ret.append ("<br>\n");
+-                ret.append (format (tags[i].text()));
+-            }
+-            return (ret.toString ());
+-        }
+-    }
+-}
+\ No newline at end of file


=====================================
debian/patches/privacy-breach.patch
=====================================
--- /dev/null
+++ b/debian/patches/privacy-breach.patch
@@ -0,0 +1,45 @@
+From: Markus Koschany <apo at debian.org>
+Date: Thu, 3 May 2018 21:16:06 +0200
+Subject: privacy breach
+
+Forwarded: not-needed
+---
+ src/build.xml                                   | 2 +-
+ src/src/org/htmlparser/util/NodeTreeWalker.java | 4 +---
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/build.xml b/src/build.xml
+index b69e532..bb47569 100644
+--- a/src/build.xml
++++ b/src/build.xml
+@@ -494,7 +494,7 @@ Update the Web Site
+         classpath="${classes}" encoding="iso-8859-1"/>
+     <mkdir dir="${docs}/checkjavadoc"/>
+     <property name="javadoc.doctitle" value="HTML Parser ${versionNumber}"/>
+-    <property name="javadoc.header" value="<A HREF="http://htmlparser.sourceforge.net" target="_top">HTML Parser Home Page</A>"/>
++    <property name="javadoc.header" value=""/>
+     <property name="javadoc.footer" value="&copy; 2005 Derrick Oswald<div align="right">${TODAY_STRING}</div>"/>
+     <property name="javadoc.bottom" value=""/>
+     <javadoc
+diff --git a/src/src/org/htmlparser/util/NodeTreeWalker.java b/src/src/org/htmlparser/util/NodeTreeWalker.java
+index 1fd2ad4..5b18c9f 100644
+--- a/src/src/org/htmlparser/util/NodeTreeWalker.java
++++ b/src/src/org/htmlparser/util/NodeTreeWalker.java
+@@ -37,10 +37,8 @@ import org.htmlparser.Node;
+  *   <th>Breadth-first traversal</th>
+  *  </tr>
+  *  <tr>
+- *   <img src="http://htmlparser.sourceforge.net/tree-traversal-depth-first.gif" alt="Diagram showing depth-first tree traversal" width="300" height="300" />
+  *  </tr>
+  *  <tr>
+- *   <img src="http://htmlparser.sourceforge.net/tree-traversal-breadth-first.gif" alt="Diagram showing breadth-first tree traversal" width="300" height="300" />
+  *  </tr>
+  * </table>
+  * @author  ian_macfarlane
+@@ -416,4 +414,4 @@ public class NodeTreeWalker implements NodeIterator
+     // hasPreviousNodes() ?
+     // these should be specificed in an interface - suggest something like ReversableNodeIterator (extends NodeIterator)
+     // possible optimisations: when doing mNextNode, we should save mCurrentNode as previousNode, and vice versa
+-}
+\ No newline at end of file
++}


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@
 02_adjust_path_in_examples.patch
 03_remove-sourceforge-logo-from-javadoc.patch
 encoding.patch
+java10.patch
+privacy-breach.patch



View it on GitLab: https://salsa.debian.org/java-team/libhtmlparser-java/compare/e0c67ff295afec73926d91c4a74addfecf30b70f...f28b02cab0682eac8c8c542e396fa18fe3d652ac

---
View it on GitLab: https://salsa.debian.org/java-team/libhtmlparser-java/compare/e0c67ff295afec73926d91c4a74addfecf30b70f...f28b02cab0682eac8c8c542e396fa18fe3d652ac
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180503/aff1c4e8/attachment.html>


More information about the pkg-java-commits mailing list