The duplicated message in
/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties
APPLICATION_IS_ALREADY_REGISTERED=Application {0} is already
registered in {1}
APPLICATION_IS_ALREADY_REGISTERED=Application is already registered.
is used in these methods:
org.jboss.tools.jst.web.context.RegisterServerContext.getErrorMessage()
org.jboss.tools.jst.web.server.RegistrationHelper.getRegistrationError(IModule,
String, IServer)
The odd thing is, both methods provide the NLS.bind parameters -
return NLS.bind(WebUIMessages.APPLICATION_IS_ALREADY_REGISTERED,
applicationName, targetServers[i].getName()); //$NON-NLS-2$
return NLS.bind(WebUIMessages.APPLICATION_IS_ALREADY_REGISTERED,
appname, server.getName());
- but at runtime, the first definition will be ignored, and NLS will use
the simple string "Application is already registered."
I can't work out how the duplicate got in, since they are on adjacent
lines, and it predates the Exadel import, so "svn blame" doesn't help.
I propose to delete the second definition. I'm pretty sure the
intention is to use the first message which takes parameters to provide
a better error message, and the string is already being passed to
NLS.bind, so it should be a perfectly safe change.
This will change the message used at runtime, but hopefully for the
better. Any objections?
--
Sean Flanigan
Senior Software Engineer
Engineering - Internationalisation
Red Hat