[Git][debian-gis-team/josm][master] 2 commits: Add upstream patch to fix Update Multipolygon function.

Bas Couwenberg gitlab at salsa.debian.org
Wed Dec 30 12:02:29 GMT 2020



Bas Couwenberg pushed to branch master at Debian GIS Project / josm


Commits:
3e8a3184 by Bas Couwenberg at 2020-12-30T12:33:19+01:00
Add upstream patch to fix Update Multipolygon function.

- - - - -
de92ad9f by Bas Couwenberg at 2020-12-30T12:47:26+01:00
Set distribution to unstable.

- - - - -


3 changed files:

- debian/changelog
- debian/patches/series
- + debian/patches/svn-r17429.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+josm (0.0.svn17428+dfsg-2) unstable; urgency=medium
+
+  * Add upstream patch to fix Update Multipolygon function.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Wed, 30 Dec 2020 12:47:17 +0100
+
 josm (0.0.svn17428+dfsg-1) unstable; urgency=medium
 
   * New tested snapshot.


=====================================
debian/patches/series
=====================================
@@ -7,3 +7,4 @@
 08-use_noto_font.patch
 09-no-java-8.patch
 openinghoursparser.patch
+svn-r17429.patch


=====================================
debian/patches/svn-r17429.patch
=====================================
@@ -0,0 +1,785 @@
+Description: Update Multipolygon removes tags instead of moving them to relation.
+ * rewrite handling of update multipolygon cases
+ * let removeTagsFromWaysIfNeeded() check if getDataset() returns null instead
+   of checking isNew(). I assume it was always meant to work like this.
+   JoinAreasAction works fine with that and I hope no plugin relies on the old
+   behaviour.
+ * add regression unit test and more unit tests to improve coverage 
+Author: GerdP
+Origin: https://josm.openstreetmap.de/changeset/17429/josm
+Bug: https://josm.openstreetmap.de/ticket/20325
+
+--- a/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
++++ b/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
+@@ -340,7 +340,7 @@ public class CreateMultipolygonAction ex
+         }
+         boolean changedMembers = rr.a != rr.b;
+         final Relation existingRelation = rr.a;
+-        final Relation relation = changedMembers ? rr.b : new Relation(rr.a);
++        final Relation relation = changedMembers ? rr.b : rr.a;
+ 
+         final List<Command> list = removeTagsFromWaysIfNeeded(relation);
+         final String commandName;
+@@ -348,22 +348,19 @@ public class CreateMultipolygonAction ex
+             list.add(new AddCommand(selectedWays.iterator().next().getDataSet(), relation));
+             commandName = getName(false);
+         } else {
+-            boolean changedKeys = !relation.getKeys().equals(existingRelation.getKeys());
+-            if (changedKeys && changedMembers)
+-                list.add(new ChangeCommand(existingRelation, relation));
+-            else if (changedMembers) {
+-                list.add(new ChangeMembersCommand(existingRelation, new ArrayList<>(relation.getMembers())));
+-            } else if (changedKeys) {
+-                list.add(ChangePropertyCommand.build(existingRelation, relation));
++            if (changedMembers) {
++                if (!relation.getKeys().equals(existingRelation.getKeys())) {
++                    list.add(new ChangeCommand(existingRelation, relation));
++                } else {
++                    list.add(new ChangeMembersCommand(existingRelation, new ArrayList<>(relation.getMembers())));
++                }
+             }
+             if (list.isEmpty()) {
+-                if (!changedMembers) {
+-                    MultipolygonTest mpTest = new MultipolygonTest();
+-                    mpTest.visit(existingRelation);
+-                    if (!mpTest.getErrors().isEmpty()) {
+-                        showErrors(mpTest.getErrors());
+-                        return null;
+-                    }
++                MultipolygonTest mpTest = new MultipolygonTest();
++                mpTest.visit(existingRelation);
++                if (!mpTest.getErrors().isEmpty()) {
++                    showErrors(mpTest.getErrors());
++                    return null;
+                 }
+ 
+                 GuiHelper.runInEDT(() -> new Notification(tr("Nothing changed")).setDuration(Notification.TIME_SHORT)
+@@ -403,7 +400,7 @@ public class CreateMultipolygonAction ex
+     /**
+      * This method removes tags/value pairs from inner and outer ways and put them on relation if necessary.
+      * Function was extended in reltoolbox plugin by Zverikk and copied back to the core
+-     * @param relation the multipolygon style relation to process. If it is new, the tags might be
++     * @param relation the multipolygon style relation to process. If it not linked to a dataset, the tags might be
+      * modified, else the list of commands will contain a command to modify its tags
+      * @return a list of commands to execute
+      */
+@@ -487,24 +484,18 @@ public class CreateMultipolygonAction ex
+         values.remove("area");
+         if (moveTags && !values.isEmpty()) {
+             // add those tag values to the relation
+-            boolean fixed = false;
+             Map<String, String> tagsToAdd = new HashMap<>();
+             for (Entry<String, String> entry : values.entrySet()) {
+                 String key = entry.getKey();
+                 if (!relation.hasKey(key)) {
+-                    if (relation.isNew())
++                    if (relation.getDataSet() == null)
+                         relation.put(key, entry.getValue());
+                     else
+                         tagsToAdd.put(key, entry.getValue());
+-                    fixed = true;
+                 }
+             }
+-            if (fixed && !relation.isNew()) {
+-                DataSet ds = relation.getDataSet();
+-                if (ds == null) {
+-                    ds = MainApplication.getLayerManager().getEditDataSet();
+-                }
+-                commands.add(new ChangePropertyCommand(ds, Collections.singleton(relation), tagsToAdd));
++            if (!tagsToAdd.isEmpty()) {
++                commands.add(new ChangePropertyCommand(Collections.singleton(relation), tagsToAdd));
+             }
+         }
+ 
+--- /dev/null
++++ b/test/data/regress/20325/data.osm
+@@ -0,0 +1,407 @@
++<?xml version='1.0' encoding='UTF-8'?>
++<osm version="0.6" generator="osmconvert 0.8.10" upload='never'>
++	<node id="5857520973" lat="16.0370779" lon="-61.7150089" version="2"/>
++	<node id="5857520974" lat="16.0358117" lon="-61.7150653" version="1"/>
++	<node id="5857520975" lat="16.0337473" lon="-61.7148014" version="2"/>
++	<node id="5857520976" lat="16.0320006" lon="-61.7154622" version="2"/>
++	<node id="5857520977" lat="16.0313056" lon="-61.7154729" version="1"/>
++	<node id="5857525096" lat="16.0468221" lon="-61.7108072" version="2"/>
++	<node id="5857525097" lat="16.0462862" lon="-61.7106347" version="2"/>
++	<node id="5857525098" lat="16.0456645" lon="-61.7111547" version="2"/>
++	<node id="5857525099" lat="16.0454129" lon="-61.7111867" version="2"/>
++	<node id="5857525100" lat="16.0442976" lon="-61.7125185" version="2"/>
++	<node id="5857525101" lat="16.0438515" lon="-61.7121215" version="2"/>
++	<node id="5857525102" lat="16.0447463" lon="-61.711278" version="1"/>
++	<node id="5857525103" lat="16.0440658" lon="-61.7107683" version="1"/>
++	<node id="5857525104" lat="16.041586" lon="-61.711911" version="1"/>
++	<node id="5857525105" lat="16.0404237" lon="-61.7118661" version="2"/>
++	<node id="5857525106" lat="16.0392144" lon="-61.7126083" version="1"/>
++	<node id="5857525107" lat="16.0390221" lon="-61.7129461" version="2"/>
++	<node id="5857525110" lat="16.0379595" lon="-61.7146029" version="2"/>
++	<node id="5857525111" lat="16.037842" lon="-61.7147455" version="2"/>
++	<node id="5857525112" lat="16.0388123" lon="-61.7197752" version="1"/>
++	<node id="5857525113" lat="16.0399053" lon="-61.7192312" version="2"/>
++	<node id="5857525114" lat="16.0417603" lon="-61.7171437" version="2"/>
++	<node id="5857525115" lat="16.0423833" lon="-61.7168869" version="2"/>
++	<node id="5857525116" lat="16.0443454" lon="-61.7150198" version="2"/>
++	<node id="5857525117" lat="16.0458506" lon="-61.7153015" version="2"/>
++	<node id="5857525118" lat="16.047006" lon="-61.7138763" version="2"/>
++	<node id="5857525119" lat="16.0477931" lon="-61.7118359" version="1"/>
++	<node id="5857525120" lat="16.0477007" lon="-61.7105793" version="2"/>
++	<node id="5857525121" lat="16.0456691" lon="-61.7101557" version="2"/>
++	<node id="5857525122" lat="16.0454443" lon="-61.7099573" version="2"/>
++	<node id="5857525123" lat="16.044803" lon="-61.7103446" version="1"/>
++	<node id="8270778667" lat="16.0444696" lon="-61.712449" version="1"/>
++	<node id="8270778668" lat="16.0452578" lon="-61.7112751" version="1"/>
++	<node id="8270778669" lat="16.0455408" lon="-61.7111764" version="1"/>
++	<node id="8270778670" lat="16.0457787" lon="-61.711096" version="1"/>
++	<node id="8270778671" lat="16.0464214" lon="-61.7106304" version="1"/>
++	<node id="8270778672" lat="16.0461598" lon="-61.7107058" version="1"/>
++	<node id="8270778673" lat="16.0465054" lon="-61.7106616" version="1"/>
++	<node id="8270778674" lat="16.0469234" lon="-61.7108012" version="1"/>
++	<node id="8270778675" lat="16.046733" lon="-61.7107958" version="1"/>
++	<node id="8270778676" lat="16.0477362" lon="-61.7107624" version="1"/>
++	<node id="8270778677" lat="16.047651" lon="-61.7105499" version="1"/>
++	<node id="8270778678" lat="16.0477203" lon="-61.7106468" version="1"/>
++	<node id="8270778679" lat="16.0475863" lon="-61.7105466" version="1"/>
++	<node id="8270778682" lat="16.0476909" lon="-61.7121734" version="1"/>
++	<node id="8270778683" lat="16.0477922" lon="-61.7116376" version="1"/>
++	<node id="8270778684" lat="16.0471266" lon="-61.7136878" version="1"/>
++	<node id="8270778685" lat="16.0468493" lon="-61.7140689" version="1"/>
++	<node id="8270778686" lat="16.0459322" lon="-61.7152671" version="1"/>
++	<node id="8270778723" lat="16.0396508" lon="-61.7145705" version="1"/>
++	<node id="8270778724" lat="16.0394661" lon="-61.7147242" version="1"/>
++	<node id="8270778725" lat="16.0392129" lon="-61.714694" version="1"/>
++	<node id="8270778726" lat="16.0389044" lon="-61.7146172" version="1"/>
++	<node id="8270778727" lat="16.0387646" lon="-61.7144772" version="1"/>
++	<node id="8270778728" lat="16.0385882" lon="-61.7142296" version="1"/>
++	<node id="8270778729" lat="16.0384452" lon="-61.7138422" version="1"/>
++	<node id="8270778730" lat="16.0384775" lon="-61.7136318" version="1"/>
++	<node id="8270778731" lat="16.0387389" lon="-61.7133755" version="1"/>
++	<node id="8270778732" lat="16.038878" lon="-61.7133466" version="1"/>
++	<node id="8270778733" lat="16.0391154" lon="-61.7133219" version="1"/>
++	<node id="8270778734" lat="16.0392631" lon="-61.7135112" version="1"/>
++	<node id="8270778735" lat="16.0393422" lon="-61.7137884" version="1"/>
++	<node id="8270778736" lat="16.039445" lon="-61.713986" version="1"/>
++	<node id="8270778737" lat="16.0396059" lon="-61.7142137" version="1"/>
++	<node id="8270778738" lat="16.039664" lon="-61.7144004" version="1"/>
++	<node id="8270778739" lat="16.0386212" lon="-61.7134393" version="1"/>
++	<node id="8270778740" lat="16.0384959" lon="-61.7140334" version="1"/>
++	<node id="8270778741" lat="16.0415364" lon="-61.7173252" version="1"/>
++	<node id="8270778742" lat="16.0395585" lon="-61.7146473" version="1"/>
++	<node id="8270778771" lat="16.0474415" lon="-61.7106022" version="1"/>
++	<node id="8270778772" lat="16.0443839" lon="-61.7125044" version="1"/>
++	<node id="8270778773" lat="16.044195" lon="-61.7124629" version="1"/>
++	<node id="8270778774" lat="16.0439321" lon="-61.7122446" version="1"/>
++	<node id="8270778775" lat="16.0408941" lon="-61.7118443" version="1"/>
++	<node id="8270778776" lat="16.0438987" lon="-61.7119807" version="1"/>
++	<node id="8270778777" lat="16.0444063" lon="-61.7115599" version="1"/>
++	<node id="8270778778" lat="16.0423457" lon="-61.7115609" version="1"/>
++	<node id="8270778779" lat="16.0456078" lon="-61.7102448" version="1"/>
++	<node id="8270778780" lat="16.0456774" lon="-61.710094" version="1"/>
++	<node id="8270778781" lat="16.0456422" lon="-61.7100352" version="1"/>
++	<node id="8270778782" lat="16.0453202" lon="-61.7099723" version="1"/>
++	<node id="8270778783" lat="16.045205" lon="-61.7100552" version="1"/>
++	<node id="8270778784" lat="16.0406833" lon="-61.711824" version="1"/>
++	<node id="8270778785" lat="16.0402876" lon="-61.7119219" version="1"/>
++	<node id="8270778786" lat="16.0390963" lon="-61.7127282" version="1"/>
++	<node id="8270778787" lat="16.0388475" lon="-61.7131986" version="1"/>
++	<node id="8270778788" lat="16.0386856" lon="-61.7133586" version="1"/>
++	<node id="8270778789" lat="16.0457213" lon="-61.7153107" version="1"/>
++	<node id="8270778790" lat="16.0446821" lon="-61.7150135" version="1"/>
++	<node id="8270778791" lat="16.0445999" lon="-61.7150017" version="1"/>
++	<node id="8270778792" lat="16.0444142" lon="-61.7149912" version="1"/>
++	<node id="8270778793" lat="16.0440591" lon="-61.7152221" version="1"/>
++	<node id="8270778794" lat="16.0420388" lon="-61.7169873" version="1"/>
++	<node id="8270778795" lat="16.0418822" lon="-61.7170366" version="1"/>
++	<node id="8270778796" lat="16.0413779" lon="-61.7175164" version="1"/>
++	<node id="8270778797" lat="16.0411975" lon="-61.717734" version="1"/>
++	<node id="8270778799" lat="16.0387041" lon="-61.7199787" version="1"/>
++	<node id="8270778800" lat="16.0386598" lon="-61.7202127" version="1"/>
++	<node id="8270778801" lat="16.0386156" lon="-61.7205583" version="1"/>
++	<node id="8270778802" lat="16.0386082" lon="-61.7208578" version="1"/>
++	<node id="8270778803" lat="16.038653" lon="-61.7209562" version="1"/>
++	<node id="8270778804" lat="16.03834" lon="-61.7138542" version="1"/>
++	<node id="8270778805" lat="16.038593" lon="-61.7134274" version="1"/>
++	<node id="8270778806" lat="16.0385422" lon="-61.713479" version="1"/>
++	<node id="8270778807" lat="16.0384866" lon="-61.7135383" version="1"/>
++	<node id="8270778808" lat="16.038411" lon="-61.7136565" version="1"/>
++	<node id="8270778809" lat="16.0381055" lon="-61.7143881" version="1"/>
++	<node id="8270778810" lat="16.0382493" lon="-61.7140741" version="1"/>
++	<node id="8270778811" lat="16.0369922" lon="-61.7150253" version="1"/>
++	<node id="8270778812" lat="16.0344118" lon="-61.7148493" version="1"/>
++	<node id="8270778813" lat="16.0388512" lon="-61.7211052" version="1"/>
++	<node id="8270778814" lat="16.0389979" lon="-61.7212547" version="1"/>
++	<node id="8270778815" lat="16.0389948" lon="-61.7214017" version="1"/>
++	<node id="8270778816" lat="16.037318" lon="-61.7208728" version="1"/>
++	<node id="8270778817" lat="16.0332892" lon="-61.7149154" version="1"/>
++	<node id="8270778818" lat="16.0324908" lon="-61.7153124" version="1"/>
++	<node id="8270778819" lat="16.0360216" lon="-61.7207055" version="1"/>
++	<node id="8270778820" lat="16.0315042" lon="-61.7154698" version="1"/>
++	<node id="8270778821" lat="16.0308438" lon="-61.7155921" version="1"/>
++	<node id="8270778822" lat="16.0307035" lon="-61.7157857" version="1"/>
++	<node id="8270778823" lat="16.0306206" lon="-61.7158854" version="1"/>
++	<node id="8270778824" lat="16.030604" lon="-61.7161667" version="1"/>
++	<node id="8270778825" lat="16.0306494" lon="-61.7171674" version="1"/>
++	<node id="8270778826" lat="16.0307363" lon="-61.7176387" version="1"/>
++	<node id="8270778827" lat="16.0315035" lon="-61.7177953" version="1"/>
++	<node id="8270778828" lat="16.0313329" lon="-61.7195338" version="1"/>
++	<node id="8270778829" lat="16.0328545" lon="-61.7204015" version="1"/>
++	<node id="8270778830" lat="16.0347021" lon="-61.7205807" version="1"/>
++	<node id="8270778850" lat="16.0389" lon="-61.7214662" version="1"/>
++	<node id="8270778851" lat="16.0387441" lon="-61.7215108" version="1"/>
++	<node id="8270778852" lat="16.0386315" lon="-61.7214549" version="1"/>
++	<node id="8270778853" lat="16.0390215" lon="-61.7213709" version="1"/>
++	<node id="8270778854" lat="16.0382834" lon="-61.7213024" version="1"/>
++	<node id="8270778855" lat="16.0380895" lon="-61.7212867" version="1"/>
++	<node id="8270778856" lat="16.0378299" lon="-61.7213346" version="1"/>
++	<node id="8270778857" lat="16.0377146" lon="-61.7213698" version="1"/>
++	<node id="8270778858" lat="16.0376816" lon="-61.7213666" version="1"/>
++	<node id="8270778859" lat="16.037663" lon="-61.7213635" version="1"/>
++	<node id="8270778860" lat="16.0376449" lon="-61.7213508" version="1"/>
++	<node id="8270778861" lat="16.0376253" lon="-61.72132" version="1"/>
++	<node id="8270778862" lat="16.0373951" lon="-61.720923" version="1"/>
++	<node id="8270778863" lat="16.0372126" lon="-61.7208591" version="1"/>
++	<node id="8270778864" lat="16.032202" lon="-61.72015" version="1"/>
++	<node id="8270778865" lat="16.0315059" lon="-61.7197856" version="1"/>
++	<node id="8270778866" lat="16.0315806" lon="-61.7179327" version="1"/>
++	<node id="8270778867" lat="16.0313692" lon="-61.7177542" version="1"/>
++	<node id="8270778868" lat="16.0306936" lon="-61.7175093" version="1"/>
++	<node id="8270778869" lat="16.0308987" lon="-61.7177333" version="1"/>
++	<node id="8270778870" lat="16.0393098" lon="-61.7194521" version="1"/>
++	<node id="8270778871" lat="16.0397538" lon="-61.719333" version="1"/>
++	<node id="8270778872" lat="16.0400669" lon="-61.7161569" version="1"/>
++	<node id="8270778873" lat="16.0397246" lon="-61.716247" version="1"/>
++	<node id="8270778874" lat="16.0393987" lon="-61.7161655" version="1"/>
++	<node id="8270778875" lat="16.0391595" lon="-61.7160024" version="1"/>
++	<node id="8270778876" lat="16.0390358" lon="-61.7158393" version="1"/>
++	<node id="8270778877" lat="16.0390729" lon="-61.7156033" version="1"/>
++	<node id="8270778878" lat="16.039242" lon="-61.7153157" version="1"/>
++	<node id="8270778879" lat="16.0394606" lon="-61.7150797" version="1"/>
++	<node id="8270778880" lat="16.0396256" lon="-61.7149939" version="1"/>
++	<node id="8270778881" lat="16.0398772" lon="-61.7150239" version="1"/>
++	<node id="8270778882" lat="16.0400422" lon="-61.7152642" version="1"/>
++	<node id="8270778883" lat="16.040104" lon="-61.7156333" version="1"/>
++	<node id="8270778884" lat="16.0371884" lon="-61.7149879" version="1"/>
++	<node id="8270778885" lat="16.0376405" lon="-61.7148623" version="1"/>
++	<node id="8270778886" lat="16.0399295" lon="-61.716238" version="1"/>
++	<node id="8270778887" lat="16.0401412" lon="-61.7159311" version="1"/>
++	<node id="8270778888" lat="16.0394003" lon="-61.7139" version="1"/>
++	<node id="8270778889" lat="16.0369612" lon="-61.7192782" version="1"/>
++	<node id="8270778890" lat="16.0366963" lon="-61.7194517" version="1"/>
++	<node id="8270778891" lat="16.0363187" lon="-61.7194773" version="1"/>
++	<node id="8270778892" lat="16.0360293" lon="-61.7194415" version="1"/>
++	<node id="8270778893" lat="16.0357055" lon="-61.7192986" version="1"/>
++	<node id="8270778894" lat="16.0355525" lon="-61.7191937" version="1"/>
++	<node id="8270778895" lat="16.0353775" lon="-61.7190663" version="1"/>
++	<node id="8270778896" lat="16.0351791" lon="-61.718872" version="1"/>
++	<node id="8270778897" lat="16.0350567" lon="-61.7186596" version="1"/>
++	<node id="8270778898" lat="16.0349925" lon="-61.718514" version="1"/>
++	<node id="8270778899" lat="16.0349983" lon="-61.718253" version="1"/>
++	<node id="8270778900" lat="16.0350683" lon="-61.7181255" version="1"/>
++	<node id="8270778901" lat="16.035185" lon="-61.7180406" version="1"/>
++	<node id="8270778902" lat="16.0354708" lon="-61.7180284" version="1"/>
++	<node id="8270778903" lat="16.0357974" lon="-61.7180952" version="1"/>
++	<node id="8270778904" lat="16.0362816" lon="-61.7181802" version="1"/>
++	<node id="8270778905" lat="16.0365207" lon="-61.7183683" version="1"/>
++	<node id="8270778906" lat="16.0366841" lon="-61.7186232" version="1"/>
++	<node id="8270778907" lat="16.0369115" lon="-61.718866" version="1"/>
++	<node id="8270778908" lat="16.036999" lon="-61.7190723" version="1"/>
++	<node id="8270778909" lat="16.036999" lon="-61.7191876" version="1"/>
++	<node id="8270778910" lat="16.0390443" lon="-61.7157061" version="1"/>
++	<node id="8270778911" lat="16.0364879" lon="-61.7194696" version="1"/>
++	<way id="889641942" version="1">
++		<nd ref="8270778723"/>
++		<nd ref="8270778742"/>
++		<nd ref="8270778724"/>
++		<nd ref="8270778725"/>
++		<nd ref="8270778726"/>
++		<nd ref="8270778727"/>
++		<nd ref="8270778728"/>
++		<nd ref="8270778740"/>
++		<nd ref="8270778729"/>
++		<nd ref="8270778730"/>
++		<nd ref="8270778739"/>
++		<nd ref="8270778731"/>
++		<nd ref="8270778732"/>
++		<nd ref="8270778733"/>
++		<nd ref="8270778734"/>
++		<nd ref="8270778735"/>
++		<nd ref="8270778888"/>
++		<nd ref="8270778736"/>
++		<nd ref="8270778737"/>
++		<nd ref="8270778738"/>
++		<nd ref="8270778723"/>
++		<tag k="area" v="yes"/>
++	</way>
++	<way id="889641943" version="1">
++		<nd ref="8270778686"/>
++		<nd ref="8270778685"/>
++		<nd ref="5857525118"/>
++		<nd ref="8270778684"/>
++		<nd ref="8270778682"/>
++		<nd ref="5857525119"/>
++		<nd ref="8270778683"/>
++		<nd ref="8270778676"/>
++		<nd ref="8270778678"/>
++		<nd ref="5857525120"/>
++		<nd ref="8270778677"/>
++		<nd ref="8270778679"/>
++		<nd ref="8270778771"/>
++		<nd ref="8270778674"/>
++		<nd ref="5857525096"/>
++		<nd ref="8270778675"/>
++		<nd ref="8270778673"/>
++		<nd ref="8270778671"/>
++		<nd ref="5857525097"/>
++		<nd ref="8270778672"/>
++		<nd ref="8270778670"/>
++		<nd ref="5857525098"/>
++		<nd ref="8270778669"/>
++		<nd ref="5857525099"/>
++		<nd ref="8270778668"/>
++		<nd ref="8270778667"/>
++		<nd ref="8270778772"/>
++		<nd ref="5857525100"/>
++		<nd ref="8270778773"/>
++		<nd ref="8270778774"/>
++		<nd ref="5857525101"/>
++		<nd ref="8270778776"/>
++		<nd ref="8270778777"/>
++		<nd ref="5857525102"/>
++		<nd ref="8270778779"/>
++		<nd ref="5857525121"/>
++		<nd ref="8270778780"/>
++		<nd ref="8270778781"/>
++		<nd ref="5857525122"/>
++		<nd ref="8270778782"/>
++		<nd ref="8270778783"/>
++		<nd ref="5857525123"/>
++		<nd ref="5857525103"/>
++		<nd ref="8270778778"/>
++		<nd ref="5857525104"/>
++		<nd ref="8270778775"/>
++		<nd ref="8270778784"/>
++		<nd ref="5857525105"/>
++		<nd ref="8270778785"/>
++		<nd ref="5857525106"/>
++		<nd ref="8270778786"/>
++		<nd ref="5857525107"/>
++		<nd ref="8270778787"/>
++		<nd ref="8270778788"/>
++		<nd ref="8270778805"/>
++		<nd ref="8270778806"/>
++		<nd ref="8270778807"/>
++		<nd ref="8270778808"/>
++		<nd ref="8270778804"/>
++		<nd ref="8270778810"/>
++		<nd ref="8270778809"/>
++		<nd ref="5857525110"/>
++		<nd ref="5857525111"/>
++		<nd ref="8270778885"/>
++		<nd ref="8270778884"/>
++		<nd ref="5857520973"/>
++		<nd ref="8270778811"/>
++		<nd ref="5857520974"/>
++		<nd ref="8270778812"/>
++		<nd ref="5857520975"/>
++		<nd ref="8270778817"/>
++		<nd ref="8270778818"/>
++		<nd ref="5857520976"/>
++		<nd ref="8270778820"/>
++		<nd ref="5857520977"/>
++		<nd ref="8270778821"/>
++		<nd ref="8270778822"/>
++		<nd ref="8270778823"/>
++		<nd ref="8270778824"/>
++		<nd ref="8270778825"/>
++		<nd ref="8270778868"/>
++		<nd ref="8270778826"/>
++		<nd ref="8270778869"/>
++		<nd ref="8270778867"/>
++		<nd ref="8270778827"/>
++		<nd ref="8270778866"/>
++		<nd ref="8270778828"/>
++		<nd ref="8270778865"/>
++		<nd ref="8270778864"/>
++		<nd ref="8270778829"/>
++		<nd ref="8270778830"/>
++		<nd ref="8270778819"/>
++		<nd ref="8270778863"/>
++		<nd ref="8270778816"/>
++		<nd ref="8270778862"/>
++		<nd ref="8270778861"/>
++		<nd ref="8270778860"/>
++		<nd ref="8270778859"/>
++		<nd ref="8270778858"/>
++		<nd ref="8270778857"/>
++		<nd ref="8270778856"/>
++		<nd ref="8270778855"/>
++		<nd ref="8270778854"/>
++		<nd ref="8270778852"/>
++		<nd ref="8270778851"/>
++		<nd ref="8270778850"/>
++		<nd ref="8270778815"/>
++		<nd ref="8270778853"/>
++		<nd ref="8270778814"/>
++		<nd ref="8270778813"/>
++		<nd ref="8270778803"/>
++		<nd ref="8270778802"/>
++		<nd ref="8270778801"/>
++		<nd ref="8270778800"/>
++		<nd ref="8270778799"/>
++		<nd ref="5857525112"/>
++		<nd ref="8270778870"/>
++		<nd ref="8270778871"/>
++		<nd ref="5857525113"/>
++		<nd ref="8270778797"/>
++		<nd ref="8270778796"/>
++		<nd ref="8270778741"/>
++		<nd ref="5857525114"/>
++		<nd ref="8270778795"/>
++		<nd ref="8270778794"/>
++		<nd ref="5857525115"/>
++		<nd ref="8270778793"/>
++		<nd ref="5857525116"/>
++		<nd ref="8270778792"/>
++		<nd ref="8270778791"/>
++		<nd ref="8270778790"/>
++		<nd ref="8270778789"/>
++		<nd ref="5857525117"/>
++		<nd ref="8270778686"/>
++		<tag k="crop" v="Bananes"/>
++		<tag k="landuse" v="farmland"/>
++	</way>
++	<way id="889641944" version="1">
++		<nd ref="8270778872"/>
++		<nd ref="8270778886"/>
++		<nd ref="8270778873"/>
++		<nd ref="8270778874"/>
++		<nd ref="8270778875"/>
++		<nd ref="8270778876"/>
++		<nd ref="8270778910"/>
++		<nd ref="8270778877"/>
++		<nd ref="8270778878"/>
++		<nd ref="8270778879"/>
++		<nd ref="8270778880"/>
++		<nd ref="8270778881"/>
++		<nd ref="8270778882"/>
++		<nd ref="8270778883"/>
++		<nd ref="8270778887"/>
++		<nd ref="8270778872"/>
++		<tag k="area" v="yes"/>
++	</way>
++	<way id="889641945" version="1">
++		<nd ref="8270778889"/>
++		<nd ref="8270778890"/>
++		<nd ref="8270778911"/>
++		<nd ref="8270778891"/>
++		<nd ref="8270778892"/>
++		<nd ref="8270778893"/>
++		<nd ref="8270778894"/>
++		<nd ref="8270778895"/>
++		<nd ref="8270778896"/>
++		<nd ref="8270778897"/>
++		<nd ref="8270778898"/>
++		<nd ref="8270778899"/>
++		<nd ref="8270778900"/>
++		<nd ref="8270778901"/>
++		<nd ref="8270778902"/>
++		<nd ref="8270778903"/>
++		<nd ref="8270778904"/>
++		<nd ref="8270778905"/>
++		<nd ref="8270778906"/>
++		<nd ref="8270778907"/>
++		<nd ref="8270778908"/>
++		<nd ref="8270778909"/>
++		<nd ref="8270778889"/>
++		<tag k="area" v="yes"/>
++	</way>
++	<relation id="12109378" version="1">
++		<member type="way" ref="889641943" role="outer"/>
++		<member type="way" ref="889641942" role="inner"/>
++		<member type="way" ref="889641944" role="inner"/>
++		<member type="way" ref="889641945" role="inner"/>
++		<tag k="type" v="multipolygon"/>
++	</relation>
++</osm>
+--- /dev/null
++++ b/test/data/regress/20325/invalid-new-upldate.osm
+@@ -0,0 +1,23 @@
++<?xml version='1.0' encoding='UTF-8'?>
++<osm version='0.6' generator='JOSM'>
++  <node id='-103646' action='modify' visible='true' lat='52.91023897279' lon='8.34637604497' />
++  <node id='-103647' action='modify' visible='true' lat='52.91083488589' lon='8.37107971528' />
++  <node id='-103648' action='modify' visible='true' lat='52.90014164684' lon='8.37178889646' />
++  <node id='-103649' action='modify' visible='true' lat='52.89954558664' lon='8.34708522614' />
++  <node id='-103652' action='modify' visible='true' lat='52.91023897279' lon='8.34637604497' />
++  <way id='-106707' action='modify' visible='true'>
++    <nd ref='-103647' />
++    <nd ref='-103648' />
++    <nd ref='-103649' />
++    <nd ref='-103652' />
++  </way>
++  <way id='-106721' action='modify' visible='true'>
++    <nd ref='-103646' />
++    <nd ref='-103647' />
++  </way>
++  <relation id='-99791' action='modify' visible='true'>
++    <member type='way' ref='-106707' role='outer' />
++    <tag k='building' v='yes' />
++    <tag k='type' v='multipolygon' />
++  </relation>
++</osm>
+--- /dev/null
++++ b/test/data/regress/20325/no-change-new.osm
+@@ -0,0 +1,31 @@
++<?xml version='1.0' encoding='UTF-8'?>
++<osm version='0.6' generator='JOSM'>
++  <node id='-102136' action='modify' visible='true' lat='52.91478453426' lon='7.37305786475' />
++  <node id='-102137' action='modify' visible='true' lat='52.91482655699' lon='7.37464273943' />
++  <node id='-102138' action='modify' visible='true' lat='52.91414612911' lon='7.37469235649' />
++  <node id='-102153' action='modify' visible='true' lat='52.91410410571' lon='7.37310748181' />
++  <node id='-102154' action='modify' visible='true' lat='52.91456184987' lon='7.37352751281' />
++  <node id='-102155' action='modify' visible='true' lat='52.91457813062' lon='7.37412847678' />
++  <node id='-102156' action='modify' visible='true' lat='52.91436792941' lon='7.37414413774' />
++  <node id='-102157' action='modify' visible='true' lat='52.91435164858' lon='7.37354317376' />
++  <way id='-103539' action='modify' visible='true'>
++    <nd ref='-102136' />
++    <nd ref='-102137' />
++    <nd ref='-102138' />
++    <nd ref='-102153' />
++    <nd ref='-102136' />
++  </way>
++  <way id='-103736' action='modify' visible='true'>
++    <nd ref='-102154' />
++    <nd ref='-102155' />
++    <nd ref='-102156' />
++    <nd ref='-102157' />
++    <nd ref='-102154' />
++  </way>
++  <relation id='-99776' action='modify' visible='true'>
++    <member type='way' ref='-103539' role='outer' />
++    <member type='way' ref='-103736' role='inner' />
++    <tag k='building' v='yes' />
++    <tag k='type' v='multipolygon' />
++  </relation>
++</osm>
+--- /dev/null
++++ b/test/data/regress/20325/no-change-old.osm
+@@ -0,0 +1,96 @@
++<?xml version='1.0' encoding='UTF-8'?>
++<osm version='0.6' generator='JOSM'>
++  <node id='1356938202' timestamp='2016-01-14T19:55:49Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8582844' lon='9.5894121' />
++  <node id='1356938203' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8582883' lon='9.58921' />
++  <node id='1356938210' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8582933' lon='9.5894126' />
++  <node id='1356938231' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.858376' lon='9.5892294' />
++  <node id='1356938233' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8583763' lon='9.5892148' />
++  <node id='1356938235' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.858377' lon='9.5894884' />
++  <node id='1356938238' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8583771' lon='9.5894805' />
++  <node id='1356938240' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8583784' lon='9.5894172' />
++  <node id='1356938248' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8583935' lon='9.5888875' />
++  <node id='1356938250' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.858397' lon='9.5887103' />
++  <node id='1356938268' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8584203' lon='9.5892318' />
++  <node id='1356938271' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8584271' lon='9.5888893' />
++  <node id='1356938298' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8585254' lon='9.589069' />
++  <node id='1356938300' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8585268' lon='9.5889985' />
++  <node id='1356938308' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8585539' lon='9.5889999' />
++  <node id='1356938310' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8585555' lon='9.5889186' />
++  <node id='1356938325' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8585861' lon='9.5889203' />
++  <node id='1356938327' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8585901' lon='9.5887207' />
++  <node id='1356938335' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8586077' lon='9.5895009' />
++  <node id='1356938338' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8586084' lon='9.5894666' />
++  <node id='1356938352' timestamp='2015-03-03T16:35:38Z' uid='481964' user='G-H' visible='true' version='4' changeset='29226783' lat='52.8586319' lon='9.5893474' />
++  <node id='1356938353' timestamp='2015-03-03T16:35:38Z' uid='481964' user='G-H' visible='true' version='4' changeset='29226783' lat='52.8586325' lon='9.5892432' />
++  <node id='1356938380' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8586513' lon='9.58972' />
++  <node id='1356938384' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8586563' lon='9.5894691' />
++  <node id='1356938412' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8586824' lon='9.5897217' />
++  <node id='1356938421' timestamp='2015-03-03T16:35:39Z' uid='481964' user='G-H' visible='true' version='4' changeset='29226783' lat='52.8587137' lon='9.5893488' />
++  <node id='1356938425' timestamp='2015-03-03T16:35:39Z' uid='481964' user='G-H' visible='true' version='4' changeset='29226783' lat='52.8587144' lon='9.5892446' />
++  <node id='1356938427' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8587234' lon='9.5897239' />
++  <node id='1356938439' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8587615' lon='9.589726' />
++  <node id='1356938445' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8587627' lon='9.5896617' />
++  <node id='1356938453' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8588076' lon='9.5896642' />
++  <node id='1356938458' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8588108' lon='9.5895014' />
++  <node id='1356938470' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8588221' lon='9.5895021' />
++  <node id='1356938474' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8588254' lon='9.5893372' />
++  <node id='1356938518' timestamp='2016-01-14T19:55:50Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8589064' lon='9.5891598' />
++  <node id='1356938522' timestamp='2016-01-14T19:55:51Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8589078' lon='9.5890896' />
++  <node id='1356938565' timestamp='2016-01-14T19:55:51Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8589653' lon='9.5893447' />
++  <node id='1356938567' timestamp='2016-01-14T19:55:51Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='36578948' lat='52.8589689' lon='9.5891632' />
++  <way id='121152976' timestamp='2017-11-07T18:33:28Z' uid='437941' user='Fischkopp0815' visible='true' version='6' changeset='53589187'>
++    <nd ref='1356938327' />
++    <nd ref='1356938250' />
++    <nd ref='1356938248' />
++    <nd ref='1356938271' />
++    <nd ref='1356938268' />
++    <nd ref='1356938231' />
++    <nd ref='1356938233' />
++    <nd ref='1356938203' />
++    <nd ref='1356938202' />
++    <nd ref='1356938210' />
++    <nd ref='1356938240' />
++    <nd ref='1356938238' />
++    <nd ref='1356938235' />
++    <nd ref='1356938335' />
++    <nd ref='1356938338' />
++    <nd ref='1356938384' />
++    <nd ref='1356938380' />
++    <nd ref='1356938412' />
++    <nd ref='1356938427' />
++    <nd ref='1356938439' />
++    <nd ref='1356938445' />
++    <nd ref='1356938453' />
++    <nd ref='1356938458' />
++    <nd ref='1356938470' />
++    <nd ref='1356938474' />
++    <nd ref='1356938565' />
++    <nd ref='1356938567' />
++    <nd ref='1356938518' />
++    <nd ref='1356938522' />
++    <nd ref='1356938298' />
++    <nd ref='1356938300' />
++    <nd ref='1356938308' />
++    <nd ref='1356938310' />
++    <nd ref='1356938325' />
++    <nd ref='1356938327' />
++  </way>
++  <way id='121153073' timestamp='2011-07-10T18:36:08Z' uid='98832' user='panzaeron' visible='true' version='1' changeset='8686908'>
++    <nd ref='1356938425' />
++    <nd ref='1356938353' />
++    <nd ref='1356938352' />
++    <nd ref='1356938421' />
++    <nd ref='1356938425' />
++  </way>
++  <relation id='1658564' timestamp='2018-10-30T17:37:44Z' uid='347762' user='Heideammer' visible='true' version='5' changeset='64019279'>
++    <member type='way' ref='121152976' role='outer' />
++    <member type='way' ref='121153073' role='inner' />
++    <tag k='addr:housenumber' v='6' />
++    <tag k='addr:postcode' v='29664' />
++    <tag k='addr:street' v='Robert-Koch-Straße' />
++    <tag k='building' v='yes' />
++    <tag k='name' v='DRK Seniorenheim' />
++    <tag k='type' v='multipolygon' />
++    <tag k='website' v='http://drk-fallingbostel.de/' />
++  </relation>
++</osm>
+--- /dev/null
++++ b/test/data/regress/20325/update-no-command-warning.osm
+@@ -0,0 +1,16 @@
++<?xml version='1.0' encoding='UTF-8'?>
++<osm version='0.6' generator='JOSM'>
++  <node id='-103699' action='modify' visible='true' lat='52.89615136699' lon='8.35203543126' />
++  <node id='-103700' action='modify' visible='true' lat='52.91706439562' lon='8.35491004017' />
++  <node id='-103701' action='modify' visible='true' lat='52.90314155932' lon='8.37961371048' />
++  <way id='-106895' action='modify' visible='true'>
++    <nd ref='-103699' />
++    <nd ref='-103700' />
++    <nd ref='-103701' />
++    <nd ref='-103699' />
++  </way>
++  <relation id='-99800' action='modify' visible='true'>
++    <member type='way' ref='-106895' role='outer' />
++    <tag k='type' v='multipolygon' />
++  </relation>
++</osm>
+--- a/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.java
++++ b/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.java
+@@ -4,6 +4,7 @@ package org.openstreetmap.josm.actions;
+ import static org.junit.jupiter.api.Assertions.assertEquals;
+ import static org.junit.jupiter.api.Assertions.assertFalse;
+ import static org.junit.jupiter.api.Assertions.assertNotNull;
++import static org.junit.jupiter.api.Assertions.assertNull;
+ import static org.junit.jupiter.api.Assertions.assertTrue;
+ 
+ import java.nio.file.Files;
+@@ -44,7 +45,7 @@ class CreateMultipolygonActionTest {
+      */
+     @RegisterExtension
+     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+-    public JOSMTestRules test = new JOSMTestRules().projection().main().preferences();
++    public JOSMTestRules test = new JOSMTestRules().projection().main().preferences().mapStyles();
+ 
+     private static Map<String, String> getRefToRoleMap(Relation relation) {
+         Map<String, String> refToRole = new TreeMap<>();
+@@ -213,4 +214,84 @@ class CreateMultipolygonActionTest {
+         assertFalse(ds.getRelations().iterator().next().hasTag("building", "yes"));
+         assertEquals(1, ds.getWays().stream().filter(w -> w.hasTag("building", "yes")).count());
+     }
++
++    /**
++     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/20325">Bug #20325</a>.
++     * @throws Exception if an error occurs
++     */
++    @Test
++    void testTicket20325() throws Exception {
++        DataSet ds = OsmReader.parseDataSet(TestUtils.getRegressionDataStream(20325, "data.osm"), null);
++        assertEquals(1, ds.getRelations().size());
++        Relation mp = ds.getRelations().iterator().next();
++        assertFalse(ds.getRelations().iterator().next().hasTag("landuse", "farmland"));
++        assertEquals(1, ds.getWays().stream().filter(w -> w.hasTag("landuse", "farmland")).count());
++        Pair<SequenceCommand, Relation> cmd = CreateMultipolygonAction.createMultipolygonCommand(ds.getWays(), mp);
++        assertNotNull(cmd);
++        cmd.a.executeCommand();
++        assertEquals(1, ds.getRelations().size());
++        assertTrue(ds.getRelations().iterator().next().hasTag("landuse", "farmland"));
++        assertEquals(0, ds.getWays().stream().filter(w -> w.hasTag("landuse", "farmland")).count());
++        cmd.a.undoCommand();
++        assertEquals(1, ds.getRelations().size());
++        assertFalse(ds.getRelations().iterator().next().hasTag("landuse", "farmland"));
++        assertEquals(1, ds.getWays().stream().filter(w -> w.hasTag("landuse", "farmland")).count());
++    }
++
++    /**
++     * Coverage test for <a href="https://josm.openstreetmap.de/ticket/20325">Bug #20325</a>.
++     * New relation, no update needed, no command should be produced.
++     * @throws Exception if an error occurs
++     */
++    @Test
++    void testTicket20325New() throws Exception {
++        DataSet ds = OsmReader.parseDataSet(TestUtils.getRegressionDataStream(20325, "no-change-new.osm"), null);
++        assertEquals(1, ds.getRelations().size());
++        Relation mp = ds.getRelations().iterator().next();
++        Pair<SequenceCommand, Relation> cmd = CreateMultipolygonAction.createMultipolygonCommand(ds.getWays(), mp);
++        assertNull(cmd);
++    }
++
++    /**
++     * Coverage test for <a href="https://josm.openstreetmap.de/ticket/20325">Bug #20325</a>.
++     * Old relation, no update needed, no command should be produced.
++     * @throws Exception if an error occurs
++     */
++    @Test
++    void testTicket20325Old() throws Exception {
++        DataSet ds = OsmReader.parseDataSet(TestUtils.getRegressionDataStream(20325, "no-change-old.osm"), null);
++        assertEquals(1, ds.getRelations().size());
++        Relation mp = ds.getRelations().iterator().next();
++        Pair<SequenceCommand, Relation> cmd = CreateMultipolygonAction.createMultipolygonCommand(ds.getWays(), mp);
++        assertNull(cmd);
++    }
++
++    /**
++     * Coverage test for <a href="https://josm.openstreetmap.de/ticket/20325">Bug #20325</a>.
++     * Relation cannot be updated but produces warnings. Doesn't test that a popup was shown.
++     * @throws Exception if an error occurs
++     */
++    @Test
++    void testTicket20325Invalid() throws Exception {
++        DataSet ds = OsmReader.parseDataSet(TestUtils.getRegressionDataStream(20325, "invalid-new-upldate.osm"), null);
++        assertEquals(1, ds.getRelations().size());
++        Relation mp = ds.getRelations().iterator().next();
++        Pair<SequenceCommand, Relation> cmd = CreateMultipolygonAction.createMultipolygonCommand(ds.getWays(), mp);
++        assertNull(cmd);
++    }
++
++    /**
++     * Coverage test for <a href="https://josm.openstreetmap.de/ticket/20325">Bug #20325</a>.
++     * Relation needs no updates but produces warnings. Doesn't test that a popup was shown.
++     * @throws Exception if an error occurs
++     */
++    @Test
++    void testTicket20325NoUpdateWarning() throws Exception {
++        DataSet ds = OsmReader.parseDataSet(TestUtils.getRegressionDataStream(20325, "update-no-command-warning.osm"), null);
++        assertEquals(1, ds.getRelations().size());
++        Relation mp = ds.getRelations().iterator().next();
++        Pair<SequenceCommand, Relation> cmd = CreateMultipolygonAction.createMultipolygonCommand(ds.getWays(), mp);
++        assertNull(cmd);
++    }
++
+ }



View it on GitLab: https://salsa.debian.org/debian-gis-team/josm/-/compare/46d685068313850c244773b7a378a4ec8b043a34...de92ad9f00639009eb98e75716d4809fa1b24cfc

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/josm/-/compare/46d685068313850c244773b7a378a4ec8b043a34...de92ad9f00639009eb98e75716d4809fa1b24cfc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20201230/2b035223/attachment-0001.html>


More information about the Pkg-grass-devel mailing list