﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17763	Redundant code with isMultipolygon()	GerdP	team	"The method isMultipolygon() is implemented in IPrimitive (return false) and (only) IRelation overrides it:
{{{
#!java
@Override
default boolean isMultipolygon() {
    return ""multipolygon"".equals(get(""type"")) || 
}
}}}
Still, we have many places where something like 
{{{
#!java
e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon()
}}}
is used instead of 
{{{
#!java
e.osm.isMultipolygon()
}}}
What is the reason for this double check? It seems to be a waste of time and space as the java compiler doesn't remove the redundant check.
Even worse seems this code in `MultipolygonCache`:
{{{
#!java
    private static boolean isMultipolygon(OsmPrimitive p) {
        return p instanceof Relation && ((Relation) p).isMultipolygon();
    }
}}}
I work on a patch to remove all this redundant code, please stop me if I missed something.
"	enhancement	closed	minor		Core		wontfix		
