in CatalogUtils localizeLayers, it use localLayerList for iterator, but it always empty. i think it may make some trouble。
some time i found when we syn Layergroup ,we will add a LayerGroup which the Resouce Catalog is null in Layers to Catalog.
public static <T extends PublishedInfo> List<LayerInfo> localizeLayers(List<T> info, Catalog catalog) throws IllegalAccessException, InvocationTargetException {
if (info != null && catalog != null) {
List<LayerInfo> localLayerList = new ArrayList(info.size());
Iterator it = localLayerList.iterator();
while(it.hasNext()) {
LayerInfo layer = (LayerInfo)it.next();
LayerInfo localLayer = localizeLayer(layer, catalog);
if (localLayer != null) {
localLayerList.add(localLayer);
} else if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("No such layer called '" + layer.getName() + "' can be found: SKIPPING");
}
}
return localLayerList;
} else {
throw new NullPointerException("Arguments may never be null");
}
}
|