code: @SuppressWarnings("PMD.DataflowAnomalyAnalysis")
      protected static String derivePattern(String path) {
          String pattern;
          if ("/".equals(path)) {
              pattern = "/**";
          } else {
              String patternBase = path;
              if (patternBase.endsWith("/")) {
                  patternBase = path.substring(0, path.length() - 1);
              }
              pattern = path + "," + path + "/**";
          }
          return pattern;
      }
docs: Derives the resource pattern from the path.
  
  @param path the path
  @return the pattern