Open dosyfier opened 7 years ago
I also ran into this issue (1.7.0); it seems to be a bug, to redirect existsLayer
to existsLayerGroup
.
As a workaround, you call an override of this function, with an extra argument quietOnNotFound
, which works.
public boolean existsLayer(String workspace, String name, boolean quietOnNotFound){
String url;
if (workspace == null) {
url = baseurl + "/rest/layers/" + name + ".xml";
} else {
url = baseurl + "/rest/layers/" + workspace + ":" + name + ".xml";
}
String composed = Util.appendQuietOnNotFound(quietOnNotFound, url);
return HTTPUtils.exists(composed, username, password);
}
Seen on geoserver-manager 1.7.0.
The
GeoServerRESTReader#existsLayer(String workspace, String name)
method seems to be erroneously implemented since it calls:GeoServerRESTReader#existsLayerGroup(String workspace, String name, boolean quietOnNotFound)
instead of:GeoServerRESTReader#existsLayer(String workspace, String name, boolean quietOnNotFound)
See the GeoServerRESTReader class, line 906.