[mkgmap] 02/02: Make java8-compatibility.patch apply to this upstream version

Andreas Tille tille at debian.org
Wed Aug 13 20:38:33 UTC 2014


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

tille pushed a commit to branch master
in repository mkgmap.

commit 215a9697acb349314a143391abad3eafa26e3c82
Author: Andreas Tille <tille at debian.org>
Date:   Wed Aug 13 22:38:19 2014 +0200

    Make java8-compatibility.patch apply to this upstream version
---
 debian/changelog                         |  1 +
 debian/patches/java8-compatibility.patch | 76 ++++++++++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 3 files changed, 78 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a478ba5..aac852f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ mkgmap (0.0.0+svn3333-1) UNRELEASED; urgency=medium
     <manfred.stock+debian at gmail.com>)
     Closes: #741596
   * d/copyright: DEP5
+  * TODO: Make java8-compatibility.patch apply to this upstream version
 
  -- Andreas Tille <tille at debian.org>  Wed, 13 Aug 2014 22:13:41 +0200
 
diff --git a/debian/patches/java8-compatibility.patch b/debian/patches/java8-compatibility.patch
new file mode 100644
index 0000000..eeb0236
--- /dev/null
+++ b/debian/patches/java8-compatibility.patch
@@ -0,0 +1,76 @@
+Note: Does not apply to latest upstream
+Description: Rename the MultiHashMap and MultiIdentityHashMap remove(K, V) methods
+ to avoid a conflict with the new Map.remove(Object, Object) method introduced in Java 8
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+Bug-Debian: https://bugs.debian.org/745097
+--- a/src/uk/me/parabola/mkgmap/osmstyle/RoadMerger.java
++++ b/src/uk/me/parabola/mkgmap/osmstyle/RoadMerger.java
+@@ -458,9 +458,9 @@
+ 		Coord mergePoint = points2.get(0);
+ 		Coord endPoint= points2.get(points2.size()-1);
+ 		
+-		startPoints.remove(mergePoint, road2);
+-		endPoints.remove(endPoint, road2);
+-		endPoints.remove(mergePoint, road1);
++		startPoints.removeKeyValue(mergePoint, road2);
++		endPoints.removeKeyValue(endPoint, road2);
++		endPoints.removeKeyValue(mergePoint, road1);
+ 
+ 		points1.addAll(points2.subList(1, points2.size()));
+ 		endPoints.add(endPoint, road1);
+--- a/src/uk/me/parabola/util/MultiIdentityHashMap.java
++++ b/src/uk/me/parabola/util/MultiIdentityHashMap.java
+@@ -54,7 +54,7 @@
+ 	    return ( results ? value : null );
+ 	}
+ 
+-	public V remove(K key, V value )
++	public V removeKeyValue(K key, V value )
+ 	{
+ 	    
+ 	    List<V> values = super.get(key);
+--- a/src/uk/me/parabola/mkgmap/filters/LineMergeFilter.java
++++ b/src/uk/me/parabola/mkgmap/filters/LineMergeFilter.java
+@@ -29,9 +29,9 @@
+ 		// Merges the points in the second one
+ 		List<Coord> points1 = line1.getPoints();
+ 		List<Coord> points2 = line2.getPoints();
+-		startPoints.remove(points1.get(0), line1);
+-		endPoints.remove(points1.get(points1.size()-1), line1);
+-		startPoints.remove(points2.get(0), line2);
++		startPoints.removeKeyValue(points1.get(0), line1);
++		endPoints.removeKeyValue(points1.get(points1.size()-1), line1);
++		startPoints.removeKeyValue(points2.get(0), line2);
+ 		startPoints.add(points1.get(0), line2);
+ 		line2.insertPointsAtStart(points1);
+ 		linesMerged.remove(line1);
+@@ -40,7 +40,7 @@
+ 	private void addPointsAtStart(MapLine line, List<Coord> additionalPoints) {
+ 		log.info("merged lines before " + line.getName());
+ 		List<Coord> points = line.getPoints();
+-		startPoints.remove(points.get(0), line);
++		startPoints.removeKeyValue(points.get(0), line);
+ 		line.insertPointsAtStart(additionalPoints);
+ 		startPoints.add(points.get(0), line);
+ 	}
+@@ -48,7 +48,7 @@
+ 	private void addPointsAtEnd(MapLine line, List<Coord> additionalPoints) {
+ 		log.info("merged lines after " + line.getName());
+ 		List<Coord> points = line.getPoints();
+-		endPoints.remove(points.get(points.size()-1), line);
++		endPoints.removeKeyValue(points.get(points.size()-1), line);
+ 		line.insertPointsAtEnd(additionalPoints);
+ 		endPoints.add(points.get(points.size()-1), line);
+ 	}
+--- a/src/uk/me/parabola/util/MultiHashMap.java
++++ b/src/uk/me/parabola/util/MultiHashMap.java
+@@ -54,7 +54,7 @@
+ 	    return ( results ? value : null );
+ 	}
+ 
+-	public V remove(K key, V value )
++	public V removeKeyValue(K key, V value )
+ 	{
+ 	    
+ 	    List<V> values = super.get(key);
diff --git a/debian/patches/series b/debian/patches/series
index 46a7f4e..0e645a8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 build_xml.patch
+java8-compatibility.patch

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



More information about the Pkg-grass-devel mailing list