Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-15946

I18NBean getText method spamming EAC logs

    XMLWordPrintable

Details

    Description

      The new biggest source of log errors as at 28/05/09 is com.atlassian.confluence.util.i18n.DefaultI18NBean's getText(String key, Object[] args) method:

      230 ERROR [confluence.util.i18n.I18NBean.getText] Error formatting internationalized string with key: 
          This is the {gliffy} macro which converts Gliffy Attachments to images you can see on a page
      230 ERROR [confluence.util.i18n.I18NBean.getText] Error formatting internationalized string with key: 
          Required. The {mockup} macro displays the ui mockup in the page.
      

      The URL for these errors is /plugins/macrobrowser/browse-macros.action so it looks like a problem with the Jsonation of the macro's description Message object. Namely, that getText(Message message) in DefaultI18NBean delegates to getText(String key, Object[] args) with the message arguments which calls java.text.MessageFormat.format(result, args) even if the args == null. As the message text contains a placeholder

      {glffy}

      or

      {mockup}

      an IllegalArgumentException is thrown.

      Couldn't the MessageFormat.format call be skipped if the Message args are null or an empty array? Even if the message text could be parsed by MessageFormat the placeholder substitutions wouldn't do anything.

      Attachments

        Issue Links

          Activity

            People

              mjensen m@ (Inactive)
              dtaylor David Taylor (Inactive)
              Votes:
              35 Vote for this issue
              Watchers:
              30 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: