public static String rmSlashFromUrl(final String url){
  return url.endsWith("/") ? url.substring(0,url.length() - 1) : url;
}

public static String rmSlashFromUrl ( final String url ) { return url . endsWith ( "/" ) ? url . substring ( 0 , url . length ( ) - 1 ) : url ; }
remove the trailing slash from url .
