[tiles-autotag] 01/01: Use a sorted map in TemplateSuite to improve the reproducibility

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue May 31 11:29:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository tiles-autotag.

commit e1c152b7429b4d74184afb4da55a22e2b52629d0
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue May 31 09:09:51 2016 +0200

    Use a sorted map in TemplateSuite to improve the reproducibility
---
 debian/changelog                        |   7 ++
 debian/patches/03-reproducibility.patch | 175 ++++++++++++++++++++++++++++++++
 debian/patches/series                   |   1 +
 3 files changed, 183 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 07fe71f..e6d822e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tiles-autotag (1.1.0-2) unstable; urgency=medium
+
+  * Use a sorted map in TemplateSuite to improve the reproducibility
+    of the files generated by tiles-autotag
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Tue, 31 May 2016 09:09:48 +0200
+
 tiles-autotag (1.1.0-1) unstable; urgency=medium
 
   * Initial release (Closes: #820738)
diff --git a/debian/patches/03-reproducibility.patch b/debian/patches/03-reproducibility.patch
new file mode 100644
index 0000000..f2b3d83
--- /dev/null
+++ b/debian/patches/03-reproducibility.patch
@@ -0,0 +1,175 @@
+Description: Use a sorted map in TemplateSuite to make the output reproducible
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/tiles-autotag-core/src/main/java/org/apache/tiles/autotag/model/TemplateSuite.java
++++ b/tiles-autotag-core/src/main/java/org/apache/tiles/autotag/model/TemplateSuite.java
+@@ -21,7 +21,7 @@
+ package org.apache.tiles.autotag.model;
+ 
+ import java.util.Collection;
+-import java.util.LinkedHashMap;
++import java.util.TreeMap;
+ import java.util.Map;
+ 
+ /**
+@@ -67,7 +67,7 @@
+             Iterable<? extends TemplateClass> classes) {
+         this.name = name;
+         this.documentation = documentation;
+-        templateClasses = new LinkedHashMap<String, TemplateClass>();
++        templateClasses = new TreeMap<String, TemplateClass>();
+         if (classes != null) {
+             for (TemplateClass templateClass : classes) {
+                 templateClasses.put(templateClass.getName(), templateClass);
+--- a/tiles-autotag-jsp/src/test/resources/tldtest-jsp.tld
++++ b/tiles-autotag-jsp/src/test/resources/tldtest-jsp.tld
+@@ -16,12 +16,12 @@
+    <tag>
+       <description>
+       <![CDATA[
+-      Documentation of the DoStuff class
++      Documentation of the DoStuffNoBody class
+       ]]>
+       </description>
+-      <name>doStuff</name>
+-      <tag-class>org.apache.tiles.autotag.jsp.test.DoStuffTag</tag-class>
+-      <body-content>scriptless</body-content>
++      <name>doStuffNoBody</name>
++      <tag-class>org.apache.tiles.autotag.jsp.test.DoStuffNoBodyTag</tag-class>
++      <body-content>empty</body-content>
+       <attribute>
+          <description>
+          <![CDATA[
+@@ -31,7 +31,7 @@
+          <name>one</name>
+          <required>true</required>
+          <rtexprvalue>true</rtexprvalue>
+-         <type>java.lang.String</type>
++         <type>java.lang.Double</type>
+       </attribute>
+       <attribute>
+          <description>
+@@ -42,7 +42,7 @@
+          <name>two</name>
+          <required>false</required>
+          <rtexprvalue>true</rtexprvalue>
+-         <type>int</type>
++         <type>float</type>
+       </attribute>
+       <attribute>
+          <description>
+@@ -53,18 +53,18 @@
+          <name>three</name>
+          <required>false</required>
+          <rtexprvalue>true</rtexprvalue>
+-         <type>long</type>
++         <type>java.util.Date</type>
+       </attribute>
+    </tag>
+    <tag>
+       <description>
+       <![CDATA[
+-      Documentation of the DoStuffNoBody class
++      Documentation of the DoStuff class
+       ]]>
+       </description>
+-      <name>doStuffNoBody</name>
+-      <tag-class>org.apache.tiles.autotag.jsp.test.DoStuffNoBodyTag</tag-class>
+-      <body-content>empty</body-content>
++      <name>doStuff</name>
++      <tag-class>org.apache.tiles.autotag.jsp.test.DoStuffTag</tag-class>
++      <body-content>scriptless</body-content>
+       <attribute>
+          <description>
+          <![CDATA[
+@@ -74,7 +74,7 @@
+          <name>one</name>
+          <required>true</required>
+          <rtexprvalue>true</rtexprvalue>
+-         <type>java.lang.Double</type>
++         <type>java.lang.String</type>
+       </attribute>
+       <attribute>
+          <description>
+@@ -85,7 +85,7 @@
+          <name>two</name>
+          <required>false</required>
+          <rtexprvalue>true</rtexprvalue>
+-         <type>float</type>
++         <type>int</type>
+       </attribute>
+       <attribute>
+          <description>
+@@ -96,7 +96,7 @@
+          <name>three</name>
+          <required>false</required>
+          <rtexprvalue>true</rtexprvalue>
+-         <type>java.util.Date</type>
++         <type>long</type>
+       </attribute>
+    </tag>
+ </taglib>
+--- a/tiles-autotag-freemarker/src/test/resources/org/apache/tiles/autotag/freemarker/test/TldtestFMModelRepository.javat
++++ b/tiles-autotag-freemarker/src/test/resources/org/apache/tiles/autotag/freemarker/test/TldtestFMModelRepository.javat
+@@ -9,38 +9,38 @@
+ public class TldtestFMModelRepository {
+ 
+     /**
+-     * The "doStuff" directive.
++     * The "doStuffNoBody" directive.
+      */
+-    private DoStuffFMModel doStuff;
++    private DoStuffNoBodyFMModel doStuffNoBody;
+ 
+     /**
+-     * The "doStuffNoBody" directive.
++     * The "doStuff" directive.
+      */
+-    private DoStuffNoBodyFMModel doStuffNoBody;
++    private DoStuffFMModel doStuff;
+ 
+     /**
+      * Constructor.
+      */
+     public TilesFMModelRepository() {
+-        doStuff = new DoStuffFMModel(new org.apache.tiles.autotag.template.DoStuffTemplate());
+         doStuffNoBody = new DoStuffNoBodyFMModel(new org.apache.tiles.autotag.template.DoStuffNoBodyTemplate());
++        doStuff = new DoStuffFMModel(new org.apache.tiles.autotag.template.DoStuffTemplate());
+     }
+ 
+     /**
+-     * Returns the "doStuff" directive.
++     * Returns the "doStuffNoBody" directive.
+      *
+-     * @return The "doStuff" directive.
++     * @return The "doStuffNoBody" directive.
+      */
+-    public DoStuffFMModel getDoStuff() {
+-        return doStuff;
++    public DoStuffNoBodyFMModel getDoStuffNoBody() {
++        return doStuffNoBody;
+     }
+ 
+     /**
+-     * Returns the "doStuffNoBody" directive.
++     * Returns the "doStuff" directive.
+      *
+-     * @return The "doStuffNoBody" directive.
++     * @return The "doStuff" directive.
+      */
+-    public DoStuffNoBodyFMModel getDoStuffNoBody() {
+-        return doStuffNoBody;
++    public DoStuffFMModel getDoStuff() {
++        return doStuff;
+     }
+ }
+--- a/tiles-autotag-velocity/src/test/resources/velocity.properties.test
++++ b/tiles-autotag-velocity/src/test/resources/velocity.properties.test
+@@ -1,3 +1,3 @@
+ # This file was automatically generated by Apache Tiles Autotag.
+-userdirective=org.apache.tiles.autotag.velocity.test.DoStuffDirective,\
+-  org.apache.tiles.autotag.velocity.test.DoStuffNoBodyDirective
+\ No newline at end of file
++userdirective=org.apache.tiles.autotag.velocity.test.DoStuffNoBodyDirective,\
++  org.apache.tiles.autotag.velocity.test.DoStuffDirective
+\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
index dbe6232..4e98074 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01-xmlpull-dependency.patch
 02-velocity-compatibility.patch
+03-reproducibility.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/tiles-autotag.git



More information about the pkg-java-commits mailing list