Uploaded image for project: 'GeoServer'
  1. GEOS-8794

[Community Backup & Restore] Local Resource Finder on Restore does not check if File is null

    Details

      Description

      During a Restore, when looking for plugins specific configurations, while trying to replace the target tile GeoServer task looks for any already existing resource of the same type

      Resource rstConfigFile = Files.asResource(resourceLoader.find(
      Paths.path(
      configFile.file().getParentFile().getName(),
      configFile.file().getName())));

      If it already exists, it replaces it, otherwise it just write the new configuration file.

      The issue pops up if the resource does not exist, find returns NULL (the most of the times).

      In that case the asResource method just throws an exception, breaking the whole process.

      Solutions is simple, we should check that .file does not return a null path.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                afabiani Alessio Fabiani
                Reporter:
                afabiani Alessio Fabiani
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: