code: protected String getCleanPath( String path ) {
  
          if (path.endsWith("/") && path.length() > 1) {
              path = path.substring(0, path.length() - 1);
          }
          return path;
      }
docs: removes a / at the end of the path string, if present
  
  @param path the path
  @return the path without trailing /