[Geoserver-devel] [JIRA] (GEOS-10103) JMS CatalogUtils localizeLayers syc error

佘远怡 created an issue

GeoServer / BugGEOS-10103

JMS CatalogUtils localizeLayers syc error

Issue Type:

BugBug

Assignee:

Unassigned

Created:

11/Jun/21 8:21 AM

Priority:

MediumMedium

Reporter:

佘远怡

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");
        }
    }

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100166-sha1:2d22d43)

Atlassian logo