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

Initialization failure on Windows with Turkish locale

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.1
    • Engine
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: