[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:08:02 EDT 2015
James Perkins created LOGTOOL-93:
------------------------------------
Summary: 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
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