Bug#745097: mkgmap: FTBFS with Java 8: name clash: remove(K, V) in MultiHashMap and remove(Object, Object) in HashMap have the same erasure

Andreas Tille andreas at an3as.eu
Wed Aug 13 20:42:57 UTC 2014


Hi Emmanuel,

I intend to upload the latest upstream.  Since your patch does not apply
to the latest upstream I wonder whether you would be so kind to update
ist ... preferably straight in Git (any DD has commit permissions in
Debian GIS).

Lintian is also claiming

   W: mkgmap: incompatible-java-bytecode-format Java7 version (Class format: 51)

If you could add a fix for this as well I'd be really happy.

Many thanks for your kind help

      Andreas.

On Fri, Aug 08, 2014 at 05:58:29PM +0200, Emmanuel Bourg wrote:
> Control: tags -1 patch
> 
> Here is a patch fixing this issue. It renames the remove(K, V) methods
> in MultiHashMap and MultiIdentityHashMap which are conflicting with the
> new Map.remove(Object, Object) method introduced in Java 8.
> 

> 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);




> _______________________________________________
> Pkg-grass-devel mailing list
> Pkg-grass-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


-- 
http://fam-tille.de



More information about the Pkg-grass-devel mailing list