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

Message bundles always use String.format() even if no format is used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Blocker
    • 2.1.0.Alpha1
    • None
    • None

    Description

      The String.format() should only be used if formatting is needed.

      Interface.java
      @Message("Test message")
      RuntimeException testMessage();
      
      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;
      }
      

      Attachments

        Activity

          People

            jperkins-rhn James Perkins
            jperkins-rhn James Perkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: