public static String stripBraces(String token){
  return token.charAt(0) == '{' && token.charAt(token.length() - 1) == '}' ? token.substring(1,token.length() - 1) : token;
}

public static String stripBraces ( String token ) { return token . charAt ( 0 ) == '{' && token . charAt ( token . length ( ) - 1 ) == '}' ? token . substring ( 1 , token . length ( ) - 1 ) : token ; }
remove the curly braces if the token is wrapped with curly braces .
