code: protected void verifyThatPathIsEmpty(Stack<String> pPathStack) {
          if (pPathStack != null && pPathStack.size() > 0) {
              throw new IllegalArgumentException("Path contains extra elements not usable for a list request: " + pPathStack);
          }
      }
docs: Check whether the given path is empty, if not, then throw an exception
  
  @param pPathStack path to check