public static String assertValidSwfValue(String value){
  if (value != null) {
    if (value.length() == 0) {
      throw new AssertionError("Empty value not allowed");
    }
    if (value.matches("\\s.*|.*\\s") || value.matches(".*[:/|\\u0000-\\u001f\\u007f-\\u009f].*") || value.contains("arn")) {
      throw new AssertionError("Value contains one or more bad characters: '" + value + "'");
    }
  }
  return value;
}

public static String assertValidSwfValue ( String value ) { if ( value != null ) { if ( value . length ( ) == 0 ) { throw new AssertionError ( "Empty value not allowed" ) ; } if ( value . matches ( "\\s.*|.*\\s" ) || value . matches ( ".*[:/|\\u0000-\\u001f\\u007f-\\u009f].*" ) || value . contains ( "arn" ) ) { throw new AssertionError ( "Value contains one or more bad characters: '" + value + "'" ) ; } } return value ; }
assert the value passes the constraints for swf fields like name , version , domain , tasklist , identifiers .
