private String formatMessagePlaceHolders(String message){
  int occurances=0;
  while (message.matches(".*\\{[a-zA-Z]+\\}.*")) {
    message=message.replaceFirst("\\{[a-zA-Z]+\\}","{" + occurances + "}");
    occurances++;
  }
  return message;
}

private String formatMessagePlaceHolders ( String message ) { int occurances = 0 ; while ( message . matches ( ".*\\{[a-zA-Z]+\\}.*" ) ) { message = message . replaceFirst ( "\\{[a-zA-Z]+\\}" , "{" + occurances + "}" ) ; occurances ++ ; } return message ; }
formats message placeholders to java format , eg { maxlength } to { 0 }
