public static String makeCompliantName(String value){
  value=value.replace(':','-');
  value=value.replace(',','-');
  value=value.replace('=','-');
  value=value.replace('*','-');
  value=value.replace('?','-');
  if (value.length() < 1) {
    value="nothing";
  }
  return value;
}

public static String makeCompliantName ( String value ) { value = value . replace ( ':' , '-' ) ; value = value . replace ( ',' , '-' ) ; value = value . replace ( '=' , '-' ) ; value = value . replace ( '*' , '-' ) ; value = value . replace ( '?' , '-' ) ; if ( value . length ( ) < 1 ) { value = "nothing" ; } return value ; }
checking for string that is not null , not empty , and not white space only using standard java classes .
