I use spring MessageSource to fetch messages from my localisation properties files.
In this case I use it to create a mail before sendiing it to the user:
String eventTitle = tournament.getEvent().getTitle();
String tournamentMessageTitle = messageSource.getMessage("tournament.subscribe_title", new Object[] {eventTitle}, "", locale);
DateFormat df = new SimpleDateFormat("dd.MM.yyyy");
String formatedDate = df.format(tournament.getDate());
String barName = bar.getName();
String tournamentMessageContent = messageSource.getMessage("tournament.subscribe_content", new Object[] {username, eventTitle, formatedDate, barName}, "", locale);
and here are the properties in message.properties
tournament.subscribe_title = You signed up for "{0}"
tournament.subscribe_content = Hello {0], <br /><br /> You’ve sucessfully signed up for “{1}”. See you on {2} at Meltdown {3}!<br/><br/>You’ll have to confirm your participation with an admin prior to the start of the event.<br/><br/>See you soon!<br/><br/>The Meltdown {3} team
So here, we have two usages of messageSource.getMessage. The first one works, the second one throws IllegalArgumentException: Unmatched braces in the pattern.
I tried to change the message, change/remove the variables, remove the quotes and double quotes, move the properties somewhere else in the message.properties file but I always get the same error