Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-908

Initialization failure on Windows with Turkish locale

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Windows with Turkish locale

      Description

      velocity-engine-core/2.0 fails to initialize on a Windows machine with Turkish locale.

       

      Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No enum constant org.apache.velocity.runtime.RuntimeConstants.SpaceGobbling.LİNES

       

      The code is catching `NoSuchElementException` instead of the `IllegalArgumentException` that is being thrown by Enum.valueOf

       

      https://github.com/apache/velocity-engine/blob/42e56bf3328e6b8f496503dc198d876def70fb78/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java#L356

       

      https://docs.oracle.com/javase/9/docs/api/java/lang/Enum.html#valueOf(java.lang.Class,%20java.lang.String)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                EqAaptc35S4GuEA4q3gK Pierre-Benoît Côté
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: