Hi
I would have submitted the bug to JIRA, but I could not join it: "Your
email address ***@***.*** doesn't have access because
osgeo-org.atlassian.net has reached its license limit."
Anyway, I'm not 100% sure if this had been actionable bug, since
`geojson-store` is under `modules/unsupported`, but here is my issue.
GeoJSONDataStore dies with StackOverflowError when given this geojson:
```
{
"type": "FeatureCollection",
"features": []
}
```
AFAIK this is totally legit according to
https://www.rfc-editor.org/rfc/rfc7946#section-3.3 :
> The value of "features" is a JSON array. Each element of the array is a
> Feature object as defined above. It is possible for this array to be empty.
I reproduced with this GeoJSONDataStoreTest test (simplified test from
testFeatures() from same file):
```
@Test
public void testEmptyFeatures() throws IOException {
URL url = TestData.url(GeoJSONDataStore.class,
"empty-featureCollection.json");
GeoJSONDataStore fds = new GeoJSONDataStore(url);
String type = fds.getNames().get(0).getLocalPart();
fds.getFeatureReader(new Query(type), null);
}
```
Code changes and stacktrace is here as well:
https://gist.github.com/ilvez/ff4325c0fe8bc67e7b3bb8c3795ca373
Cheers,
Taavi
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users