Uploaded image for project: 'Log Tool'
  1. Log Tool
  2. LOGTOOL-45

Avoid unnecessary calls to String#format()

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 1.0.2.Final, 1.1.0.Beta1
    • None
    • None

    Description

      Generated message bundle methods always contain an invocation of String#format() also if there actually is no parameter to be replaced, e.g. like this:

      @Override
      public final String mustNotBeNull() {
          String result = String.format(mustNotBeNull0$str());
          return result;
      }
      

      AFAICS the invocation of format() seems superfluous, instead the String might directly be returned for performance reasons.

      Attachments

        Activity

          People

            jperkins-rhn James Perkins
            gunnar.morling Gunnar Morling
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: