Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-26048

NPE when trying to evaluate the IsBrowser condition under a Turkish locale

    XMLWordPrintable

Details

    Description

      When we try to evaluate what browser is in play, we uppercase the value we get from the user agent.

      Unfortunately, under turkish when we try to uppercase 'msie' we will get MSİE instead of MSIE. We should always uppercase the browser name using English rules if we are using this string for system purposes, we should only use the user's locale for uppercasing when rendering the uppercased value for the user.

      Exceptions will be recorded in the logs, they will be similar to:

      java.lang.IllegalArgumentException: No enum const class com.atlassian.jira.util.UserAgentUtil$BrowserFamily.MS›E
      	at java.lang.Enum.valueOf(Enum.java:196)
      	at com.atlassian.jira.util.UserAgentUtil$BrowserFamily.valueOf(UserAgentUtil.java:12)
      	at com.atlassian.jira.plugin.webfragment.conditions.IsBrowserCondition.shouldDisplay(IsBrowserCondition.java:65)
      	at com.atlassian.plugin.web.conditions.InvertedCondition.shouldDisplay(InvertedCondition.java:23)
      

      Attachments

        Activity

          People

            rsmart metapoint
            cychan Chai Ying Chan [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: