diff --git a/src/catalog/backends/datadir/src/main/java/org/geoserver/cloud/event/remote/datadir/RemoteEventDataDirectoryProcessor.java b/src/catalog/backends/datadir/src/main/java/org/geoserver/cloud/event/remote/datadir/RemoteEventDataDirectoryProcessor.java index be3349603..411b50dfb 100644 --- a/src/catalog/backends/datadir/src/main/java/org/geoserver/cloud/event/remote/datadir/RemoteEventDataDirectoryProcessor.java +++ b/src/catalog/backends/datadir/src/main/java/org/geoserver/cloud/event/remote/datadir/RemoteEventDataDirectoryProcessor.java @@ -135,7 +135,7 @@ public void onRemoteAddEvent(InfoAdded event) { case CatalogInfo info -> facade.add(info); case ServiceInfo config -> configFacade.add(config); case SettingsInfo config -> configFacade.add(config); - case LoggingInfo config -> log.debug("ignoring unused LoggingInfo"); + case LoggingInfo config -> log.debug("ignoring unused LoggingInfo {}", config); default -> log.warn("Don't know how to handle remote envent {})", event); } } @@ -189,18 +189,16 @@ private Info loadInfo(InfoModified event) { Class ctype = (Class) type.getType(); return catalogFacade().get(objectId, ctype).orElse(null); } - Info configInfo = - switch (type) { - case GEOSERVER -> configFacade.getGlobal(); - case SERVICE -> configFacade.getService(objectId, ServiceInfo.class); - case SETTINGS -> configFacade.getSettings(objectId); - case LOGGING -> configFacade.getLogging(); - default -> { - log.warn("Don't know how to handle remote modify envent {}", event); - yield null; - } - }; - return configInfo; + return switch (type) { + case GEOSERVER -> configFacade.getGlobal(); + case SERVICE -> configFacade.getService(objectId, ServiceInfo.class); + case SETTINGS -> configFacade.getSettings(objectId); + case LOGGING -> configFacade.getLogging(); + default -> { + log.warn("Don't know how to handle remote modify envent {}", event); + yield null; + } + }; } @EventListener(DefaultWorkspaceSet.class) diff --git a/src/catalog/plugin/src/main/java/org/geoserver/catalog/plugin/CatalogInfoRepositoryHolderImpl.java b/src/catalog/plugin/src/main/java/org/geoserver/catalog/plugin/CatalogInfoRepositoryHolderImpl.java index cb4e38a3f..bb33279f0 100644 --- a/src/catalog/plugin/src/main/java/org/geoserver/catalog/plugin/CatalogInfoRepositoryHolderImpl.java +++ b/src/catalog/plugin/src/main/java/org/geoserver/catalog/plugin/CatalogInfoRepositoryHolderImpl.java @@ -50,6 +50,7 @@ public > R repositoryF return (R) repos.forObject(info); } + @SuppressWarnings("java:S1452") public List> all() { return repos.getAll(); }