Ignore:
Timestamp:
2016-10-26T13:09:07+02:00 (4 years ago)
Author:
simon04
Message:

fix #13827 - Exporting invalid multipolygon as GeoJSON crashes JOSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java

    r10852 r11166  
    7777        }
    7878    }
     79
     80    /**
     81     * Unit test for exporting invalid multipolygons, see #13827
     82     * @throws Exception if an error occurs
     83     */
     84    @Test
     85    public void testMultipolygonRobustness() throws Exception {
     86        try (FileInputStream in = new FileInputStream("data_nodist/multipolygon.osm")) {
     87            DataSet ds = OsmReader.parseDataSet(in, null);
     88            final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null);
     89            final GeoJSONWriter writer = new GeoJSONWriter(layer);
     90            assertTrue(writer.write().contains("MultiPolygon"));
     91        }
     92    }
    7993}
Note: See TracChangeset for help on using the changeset viewer.