[geogebra] 04/05: Added a patch to use libcommons-collections3-java instead of libcollections15-java

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Apr 7 20:47:18 UTC 2014


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

ebourg-guest pushed a commit to branch build
in repository geogebra.

commit 38f2bf14106046cc6185b62e40cd3bd8f5df87ba
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon Apr 7 22:31:26 2014 +0200

    Added a patch to use libcommons-collections3-java instead of libcollections15-java
---
 debian/changelog                                   |   2 +
 debian/control                                     |   2 +-
 debian/patches/series                              |   1 +
 .../patches/use-apache-commons-collections.patch   | 147 +++++++++++++++++++++
 debian/rules                                       |   2 +-
 5 files changed, 152 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7c9854d..a9eb747 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 geogebra (4.0.34.0+dfsg1-3) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Added a patch to use libcommons-collections3-java instead of
+    libcollections15-java
   * debian/control:
     - Standards-Version updated to 3.9.5 (no changes)
     - Use canonical URLs for the Vcs-* fields
diff --git a/debian/control b/debian/control
index 3b8ece9..7324451 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Build-Depends:
  xsltproc,
  docbook-xsl,
  mathpiper (>= 0.81f+svn4469+dfsg3),
- libcollections15-java,
+ libcommons-collections3-java,
  libcommons-math-java,
  libfreehep-xml-java,
  libfreehep-util-java,
diff --git a/debian/patches/series b/debian/patches/series
index e3ff3e8..70be79e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ patch/ScientificFormat.java.diff -p1
 patch/applet_export.diff -p1
 patch/no_mac.diff -p1
 patch/version.diff -p1
+use-apache-commons-collections.patch
diff --git a/debian/patches/use-apache-commons-collections.patch b/debian/patches/use-apache-commons-collections.patch
new file mode 100644
index 0000000..c28278b
--- /dev/null
+++ b/debian/patches/use-apache-commons-collections.patch
@@ -0,0 +1,147 @@
+Description: Replaces collections15 with commons-collections
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/edu/uci/ics/jung/algorithms/shortestpath/DijkstraDistance.java
++++ b/edu/uci/ics/jung/algorithms/shortestpath/DijkstraDistance.java
+@@ -19,8 +19,8 @@
+ import java.util.Map;
+ import java.util.Set;
+ 
+-import org.apache.commons.collections15.Transformer;
+-import org.apache.commons.collections15.functors.ConstantTransformer;
++import org.apache.commons.collections.Transformer;
++import org.apache.commons.collections.functors.ConstantTransformer;
+ 
+ import edu.uci.ics.jung.algorithms.util.BasicMapEntry;
+ import edu.uci.ics.jung.algorithms.util.MapBinaryHeap;
+@@ -65,7 +65,7 @@
+ public class DijkstraDistance<V,E> implements Distance<V>
+ {
+     protected Hypergraph<V,E> g;
+-    protected Transformer<E,? extends Number> nev;
++    protected Transformer/*<E,? extends Number>*/ nev;
+     protected Map<V,SourceData> sourceMap;   // a map of source vertices to an instance of SourceData
+     protected boolean cached;
+     protected double max_distance;
+@@ -81,7 +81,7 @@
+      * @param nev   the class responsible for returning weights for edges
+      * @param cached    specifies whether the results are to be cached
+      */
+-    public DijkstraDistance(Hypergraph<V,E> g, Transformer<E,? extends Number> nev, boolean cached) {
++    public DijkstraDistance(Hypergraph<V,E> g, Transformer/*<E,? extends Number>*/ nev, boolean cached) {
+         this.g = g;
+         this.nev = nev;
+         this.sourceMap = new HashMap<V,SourceData>();
+@@ -98,7 +98,7 @@
+      * @param g     the graph on which distances will be calculated
+      * @param nev   the class responsible for returning weights for edges
+      */
+-    public DijkstraDistance(Hypergraph<V,E> g, Transformer<E,? extends Number> nev) {
++    public DijkstraDistance(Hypergraph<V,E> g, Transformer/*<E,? extends Number>*/ nev) {
+         this(g, nev, true);
+     }
+     
+@@ -198,7 +198,7 @@
+                 {
+                     if (!sd.distances.containsKey(w))
+                     {
+-                        double edge_weight = nev.transform(e).doubleValue();
++                        double edge_weight = ((Number) nev.transform(e)).doubleValue();
+                         if (edge_weight < 0)
+                             throw new IllegalArgumentException("Edges weights must be non-negative");
+                         double new_dist = v_dist + edge_weight;
+--- a/edu/uci/ics/jung/algorithms/shortestpath/DijkstraShortestPath.java
++++ b/edu/uci/ics/jung/algorithms/shortestpath/DijkstraShortestPath.java
+@@ -17,7 +17,7 @@
+ import java.util.Map;
+ import java.util.Set;
+ 
+-import org.apache.commons.collections15.Transformer;
++import org.apache.commons.collections.Transformer;
+ 
+ import edu.uci.ics.jung.graph.Graph;
+ 
+@@ -47,7 +47,7 @@
+      * @param nev   the class responsible for returning weights for edges
+      * @param cached    specifies whether the results are to be cached
+      */
+-    public DijkstraShortestPath(Graph<V,E> g, Transformer<E, ? extends Number> nev, boolean cached)
++    public DijkstraShortestPath(Graph<V,E> g, Transformer/*<E, ? extends Number>*/ nev, boolean cached)
+     {
+         super(g, nev, cached);
+     }
+@@ -60,7 +60,7 @@
+      * @param g     the graph on which distances will be calculated
+      * @param nev   the class responsible for returning weights for edges
+      */
+-    public DijkstraShortestPath(Graph<V,E> g, Transformer<E, ? extends Number> nev)
++    public DijkstraShortestPath(Graph<V,E> g, Transformer/*<E, ? extends Number>*/ nev)
+     {
+         super(g, nev);
+     }
+--- a/edu/uci/ics/jung/algorithms/util/MapBinaryHeap.java
++++ b/edu/uci/ics/jung/algorithms/util/MapBinaryHeap.java
+@@ -23,7 +23,7 @@
+ import java.util.Queue;
+ import java.util.Vector;
+ 
+-import org.apache.commons.collections15.IteratorUtils;
++import org.apache.commons.collections.IteratorUtils;
+ 
+ /**
+  * An array-based binary heap implementation of a priority queue, 
+@@ -317,7 +317,7 @@
+     @Override
+     public Iterator<T> iterator()
+     {
+-        return IteratorUtils.<T>unmodifiableIterator(heap.iterator());
++        return (Iterator<T>) IteratorUtils.unmodifiableIterator(heap.iterator());
+     }
+ 
+     /**
+--- a/edu/uci/ics/jung/graph/SparseMultigraph.java
++++ b/edu/uci/ics/jung/graph/SparseMultigraph.java
+@@ -18,7 +18,7 @@
+ import java.util.Map;
+ import java.util.Set;
+ 
+-import org.apache.commons.collections15.Factory;
++import org.apache.commons.collections.Factory;
+ 
+ import edu.uci.ics.jung.graph.util.EdgeType;
+ import edu.uci.ics.jung.graph.util.Pair;
+@@ -37,8 +37,8 @@
+      * @param <V> the vertex type for the graph factory
+      * @param <E> the edge type for the graph factory
+      */
+-	public static <V,E> Factory<Graph<V,E>> getFactory() { 
+-		return new Factory<Graph<V,E>> () {
++	public static <V,E> Factory/*<Graph<V,E>>*/ getFactory() { 
++		return new Factory/*<Graph<V,E>>*/ () {
+ 			public Graph<V,E> create() {
+ 				return new SparseMultigraph<V,E>();
+ 			}
+--- a/geogebra/kernel/discrete/AlgoShortestDistance.java
++++ b/geogebra/kernel/discrete/AlgoShortestDistance.java
+@@ -17,7 +17,7 @@
+ import java.util.HashMap;
+ import java.util.List;
+ 
+-import org.apache.commons.collections15.Transformer;
++import org.apache.commons.collections.Transformer;
+ 
+ public class AlgoShortestDistance extends AlgoElement {
+ 	
+@@ -122,9 +122,9 @@
+         if (weighted.getBoolean() == true) {
+         	//weighted Shortest Path
+         	// use length of segments to weight
+-	        Transformer<MyLink, Double> wtTransformer = new Transformer<MyLink,Double>() {
+-	        	public Double transform(MyLink link) {
+-	        	return link.weight;
++	        Transformer/*<MyLink, Double>*/ wtTransformer = new Transformer/*<MyLink,Double>*/() {
++	        	public Double transform(Object link) {
++	        	return ((MyLink) link).weight;
+ 	        	}
+ 	        	};
+         	alg = new DijkstraShortestPath<MyNode, MyLink>(g, wtTransformer);
diff --git a/debian/rules b/debian/rules
index bc56c26..03d3247 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ TG_BRANCHES += patch/version
 -include /usr/share/topgit/tg2quilt.mk
 
 export JAVA_HOME=/usr/lib/jvm/default-java
-export CLASSPATH=/usr/share/java/mathpiper.jar:/usr/share/java/commons-math.jar:/usr/share/java/freehep-xml.jar:/usr/share/java/freehep-util.jar:/usr/share/java/freehep-graphics2d.jar:/usr/share/java/freehep-io.jar:/usr/share/java/freehep-graphicsio.jar:/usr/share/java/freehep-graphicsio-svg.jar:/usr/share/java/freehep-graphicsio-pdf.jar:/usr/share/java/freehep-graphicsio-emf.jar:/usr/share/icedtea-web/plugin.jar:/usr/share/java/jlatexmath.jar:/usr/share/java/collections15.jar:/usr/share [...]
+export CLASSPATH=/usr/share/java/mathpiper.jar:/usr/share/java/commons-math.jar:/usr/share/java/freehep-xml.jar:/usr/share/java/freehep-util.jar:/usr/share/java/freehep-graphics2d.jar:/usr/share/java/freehep-io.jar:/usr/share/java/freehep-graphicsio.jar:/usr/share/java/freehep-graphicsio-svg.jar:/usr/share/java/freehep-graphicsio-pdf.jar:/usr/share/java/freehep-graphicsio-emf.jar:/usr/share/icedtea-web/plugin.jar:/usr/share/java/jlatexmath.jar:/usr/share/java/commons-collections3.jar:/us [...]
 
 %:
 	dh $@ --with javahelper

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



More information about the pkg-java-commits mailing list