Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6309

Freemarker errors at language change page due to locale with no display name returned by Locale.getAvailableLocales() in UtilMisc.java#getAvailableLocaleList

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 14.12.01, 13.07.02, 16.11.01
    • Component/s: framework
    • Labels:
      None

      Description

      For some reason Locale.getAvailableLocales() returns an array list whose first member is a locale without a display name which causes an FTL error at ListLocales page. The error is not occurring for the demo trunk. The attached patch adds a line to UtilMisc to check that a displayName exists before adding the locale to the list in case the same happens for other users.

      1. OFBIZ-6309.patch
        0.8 kB
        Christian Carlow

        Issue Links

          Activity

          Hide
          adrianc@hlmksw.com Adrian Crum added a comment -

          What JRE version are you using? There is no error on my local copy, so I suspect this is a bug in the JRE.

          Show
          adrianc@hlmksw.com Adrian Crum added a comment - What JRE version are you using? There is no error on my local copy, so I suspect this is a bug in the JRE.
          Hide
          ofbizzer Christian Carlow added a comment -

          Adrian,

          OpenJDK Runtime Environment (build 1.8.0_45-b13) on Fedora Linux 21

          Show
          ofbizzer Christian Carlow added a comment - Adrian, OpenJDK Runtime Environment (build 1.8.0_45-b13) on Fedora Linux 21
          Hide
          adrianc@hlmksw.com Adrian Crum added a comment -

          Fixed in rev 167674. Thanks!

          Show
          adrianc@hlmksw.com Adrian Crum added a comment - Fixed in rev 167674. Thanks!
          Hide
          adrianc@hlmksw.com Adrian Crum added a comment -

          FYI: The JavaDoc says the getDisplayName() method can return an empty String, so the bug was in our code, not in the JRE.

          Show
          adrianc@hlmksw.com Adrian Crum added a comment - FYI: The JavaDoc says the getDisplayName() method can return an empty String, so the bug was in our code, not in the JRE.
          Hide
          wt Wai added a comment -

          The patch is not in the proper format. Cannot be used as is.

          Show
          wt Wai added a comment - The patch is not in the proper format. Cannot be used as is.
          Hide
          mbrohl Michael Brohl added a comment -

          What's wrong with it? It's already committed and the issue is closed.

          Show
          mbrohl Michael Brohl added a comment - What's wrong with it? It's already committed and the issue is closed.
          Hide
          wt Wai added a comment -

          The first line in the patch caused my patch process to fail. If you had already committed the change, then its not a problem. Thanks.

          Show
          wt Wai added a comment - The first line in the patch caused my patch process to fail. If you had already committed the change, then its not a problem. Thanks.

            People

            • Assignee:
              adrianc@hlmksw.com Adrian Crum
              Reporter:
              ofbizzer Christian Carlow
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development