public static String stripQueryPath(final String path){
  return path.replaceFirst(REGEX_QUERY_PATH,"");
}

public static String stripQueryPath ( final String path ) { return path . replaceFirst ( REGEX_QUERY_PATH , "" ) ; }
removes the query path from the path which potentially could be treated as a path containing wildcard special characters .
