[jboss-jira] [JBoss JIRA] (LOGTOOL-93) Message bundles always use String.format() even if no format is used
James Perkins (JIRA)
issues at jboss.org
Thu Jul 9 18:10:02 EDT 2015
[ https://issues.jboss.org/browse/LOGTOOL-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Perkins updated LOGTOOL-93:
---------------------------------
Fix Version/s: 2.1.0.Alpha1
> Message bundles always use String.format() even if no format is used
> --------------------------------------------------------------------
>
> Key: LOGTOOL-93
> URL: https://issues.jboss.org/browse/LOGTOOL-93
> Project: Log Tool
> Issue Type: Bug
> Reporter: James Perkins
> Assignee: James Perkins
> Priority: Blocker
> Fix For: 2.1.0.Alpha1
>
>
> The {{String.format()}} should only be used if formatting is needed.
> {code:java|title=Interface.java}
> @Message("Test message")
> RuntimeException testMessage();
> {code}
> {code:java|title=Interface_$bundle.java}
> @Override
> public final RuntimeException testMessage() {
> final RuntimeException result = new RuntimeException(String.format(testMessage$str()));
> final StackTraceElement[] st = result.getStackTrace();
> result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
> return result;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list