public static String ensureStartingSlash(String path){
  return path.charAt(0) != '/' ? ("/" + path) : path;
}

public static String ensureStartingSlash ( String path ) { return path . charAt ( 0 ) != '/' ? ( "/" + path ) : path ; }
ensures that a path always starts with a slash .
