Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-487

Pivot doesn't start in turkish locale (and other locales)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4, 1.5
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None

      Description

      Run, for example, the StockTracker demo with turkish user locale, ie. with VM options "-Duser.country=TR -Duser.language=tr". You get:

      Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
      at org.apache.pivot.wtk.Component.installThemeSkin(Component.java:737)
      at org.apache.pivot.wtk.Window.<init>(Window.java:393)
      at org.apache.pivot.wtk.Window.<init>(Window.java:388)
      at org.apache.pivot.tutorials.stocktracker.StockTrackerWindow.<init>(StockTrackerWindow.java:135)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at org.apache.pivot.wtkx.WTKXSerializer.processStartElement(WTKXSerializer.java:623)
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:455)
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:411)
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:398)
      at org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:379)
      at org.apache.pivot.tutorials.stocktracker.StockTracker.startup(StockTracker.java:45)
      at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:94)
      at java.awt.Window.processEvent(Window.java:1820)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Window.dispatchEventImpl(Window.java:2475)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      Caused by: java.lang.IllegalArgumentException: No enum const class org.apache.pivot.wtk.MessageType.QUESTÄ°ON
      at java.lang.Enum.valueOf(Enum.java:196)
      at org.apache.pivot.wtk.MessageType.valueOf(MessageType.java:22)
      at org.apache.pivot.wtk.skin.terra.TerraTheme.loadMessageIcons(TerraTheme.java:229)
      at org.apache.pivot.wtk.skin.terra.TerraTheme.load(TerraTheme.java:201)
      at org.apache.pivot.wtk.skin.terra.TerraTheme.<init>(TerraTheme.java:171)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at org.apache.pivot.util.Service.getProvider(Service.java:96)
      at org.apache.pivot.wtk.Theme.<clinit>(Theme.java:73)
      ... 29 more

      The reason is the use of toUpperCase() and toLowerCase() in various parts of Pivot. Those parts should be changed to toUpperCase(Locale.US) / toLowerCase(Locale.US), as discussed in PIVOT-486.

        Attachments

          Activity

            People

            • Assignee:
              grandinj Noel Grandin
              Reporter:
              dmoebius Dirk Moebius
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: