[jira] [Commented] (VELOCITY-908) Initialization failure on Windows with Turkish locale

2019-01-26 Thread Michael Osipov (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753168#comment-16753168
 ] 

Michael Osipov commented on VELOCITY-908:
-

Why? Since the change avoids the IAE.

> Initialization failure on Windows with Turkish locale
> -
>
> Key: VELOCITY-908
> URL: https://issues.apache.org/jira/browse/VELOCITY-908
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
> Environment: Windows with Turkish locale
>Reporter: Pierre-Benoît Côté
>Priority: Minor
>
> 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)]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-908) Initialization failure on Windows with Turkish locale

2019-01-25 Thread JIRA


[ 
https://issues.apache.org/jira/browse/VELOCITY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16752896#comment-16752896
 ] 

Pierre-Benoît Côté commented on VELOCITY-908:
-

I confirm that toUpperCase(Locale.ROOT) works.

It would still be a good idea to change the catch Exception from 
NoSuchElementException to IllegalArgumentException

 

> Initialization failure on Windows with Turkish locale
> -
>
> Key: VELOCITY-908
> URL: https://issues.apache.org/jira/browse/VELOCITY-908
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
> Environment: Windows with Turkish locale
>Reporter: Pierre-Benoît Côté
>Priority: Minor
>
> 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)]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-908) Initialization failure on Windows with Turkish locale

2019-01-25 Thread Michael Osipov (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16752727#comment-16752727
 ] 

Michael Osipov commented on VELOCITY-908:
-

Could you try a version from trunk if provided? The codespot should be 
{{im.toUpperCase(Locale.ROOT)}} instead of {{im.toUpperCase()}}.

> Initialization failure on Windows with Turkish locale
> -
>
> Key: VELOCITY-908
> URL: https://issues.apache.org/jira/browse/VELOCITY-908
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
> Environment: Windows with Turkish locale
>Reporter: Pierre-Benoît Côté
>Priority: Minor
>
> 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)]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org