[jboss-jira] [JBoss JIRA] (LOGTOOL-52) Remove string concatenation during message construction

Bill Burke (JIRA) jira-events at lists.jboss.org
Sat Jun 9 12:46:04 EDT 2012


    [ https://issues.jboss.org/browse/LOGTOOL-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700320#comment-12700320 ] 

Bill Burke commented on LOGTOOL-52:
-----------------------------------

to illustrate:
{code}
@MessageBundle(projectCode = "RESTEASY")
public interface Bundle
{
   @Message(id = 102, value="JBoss Logging Sucks {0}", format= Message.Format.NO_FORMAT)
   String jbossLoggingSucks();
}
{code}

Generates the following code.  So every call to jbossLoggingSucks() is multiple string concatenations.
{code}
    public final String jbossLoggingSucks() {
        String result = ((projectCode +"000102: ")+ jbossLoggingSucks$str());
        return result;
    }
{code}
                
> Remove string concatenation during message construction
> -------------------------------------------------------
>
>                 Key: LOGTOOL-52
>                 URL: https://issues.jboss.org/browse/LOGTOOL-52
>             Project: Log Tool
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Bill Burke
>            Assignee: James Perkins
>             Fix For: 1.0.3.Final, 1.1.0.Beta1
>
>
> I have noticed a small deficiency in your otherwise completely excellent software!  As it turns out, the source code generation produces superfluous string concatenations.  It would be more efficient if the string concatenation were to happen either during processing, or within the right-hand side of the static field assignment expression in the generated classes.
> Keep up the top-notch work on the definitely not over-engineered project!  Excelsior!!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list