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

CatalogRepository should return a null on store not found, instead it throws a RuntimeException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12.4, 2.13.2
    • Component/s: None
    • Labels:

      Description

      From the stack trace:

      Caused by: java.lang.RuntimeException: Cannot find datastore NWS:postgres-test-netcdf in workspace null
      at org.geoserver.catalog.CatalogRepository.access(CatalogRepository.java:65)
      at org.geoserver.catalog.CatalogRepository.dataStore(CatalogRepository.java:48)
      at org.geotools.coverage.io.catalog.CoverageSlicesCatalog.<init>(CoverageSlicesCatalog.java:186)
      ... 143 more
      

      However the interface says:

      /**
           * Search for the DataStore by name.
           *
           * @param Name The typeName (namespace and name) to search for
           * @return DataAccess api providing access to the indicatedTypeName (or null if not found)
           */
      

        Attachments

          Activity

            People

            • Assignee:
              aaime Andrea Aime
              Reporter:
              aaime Andrea Aime
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: