struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksandr Mashchenko (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4919) The load of properties file doesnt show the Exception obtained if exist a problem with Unicode character
Date Thu, 15 Feb 2018 19:29:00 GMT

    [ https://issues.apache.org/jira/browse/WW-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16366155#comment-16366155
] 

Aleksandr Mashchenko edited comment on WW-4919 at 2/15/18 7:28 PM:
-------------------------------------------------------------------

Case 1:

You have 1 properties file _message_ru.properties_ with malformed encoding. Requesting ru
locale you get
{code:java}
WARN  org.apache.struts2.util.TextProviderHelper - The first TextProvider in the ValueStack
(com.opensymphony.xwork2.ActionSupport) could not locate the message resource with key 'some'
 WARN  org.apache.struts2.util.TextProviderHelper - The default value expression 'some' was
evaluated and did not match a property. The literal value 'some' will be used.{code}
This warning can be improved but at least it is something in the logs.

Case 2:

You have 2 properties files _message.properties_ and _message_ru.properties._ Where _ru_ has
malformed encoding. Requesting ru locale you get value from _message.properties_ file w/o
any warning in logs, because java silently fallbacks to default property.

 


was (Author: aleksandr-m):
Case 1:

You have 1 properties file _message_ru.properties_ with malformed encoding. Requesting ru
locale you get
{code:java}
WARN  org.apache.struts2.util.TextProviderHelper - The first TextProvider in the ValueStack
(com.opensymphony.xwork2.ActionSupport) could not locate the message resource with key 'some'
 WARN  org.apache.struts2.util.TextProviderHelper - The default value expression 'some' was
evaluated and did not match a property. The literal value 'some' will be used.{code}
This warning can be improved but at least it is something in the logs.

Case 2:

You have 2 properties file _message.properties_ and _message_ru.properties._ Where _ru_ has
malformed encoding. Requesting ru locale you get value from _message.properties_ file w/o
any warning in logs, because java silently fallbacks to default property.

 

> The load of properties file doesnt show the Exception obtained if exist a problem with
Unicode character
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WW-4919
>                 URL: https://issues.apache.org/jira/browse/WW-4919
>             Project: Struts 2
>          Issue Type: Improvement
>         Environment: When loading Struts2 in the Web Application
>            Reporter: Manuel Villalobos
>            Priority: Minor
>             Fix For: 2.6
>
>
> When loading a properties file for use with the Text tag or with getText inside the Action,
if a Unicode character has a problem the total content of the file is not loaded and they
are not available for use. The problem is that the error found in the load is nowhere seen.
> Please help her in situations like that show up in the load the error you get.
> When trying to load manually the properties Java file throws the message "java.lang.IllegalArgumentException:
Malformed \ uxxxx encoding"
> Please help you so that when there are problems loading the properties file, messages
will be generated in the log



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

Mime
View raw message