[ https://issues.apache.org/jira/browse/UIMA-5961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16876484#comment-16876484
]
Marshall Schor edited comment on UIMA-5961 at 7/1/19 8:47 PM:
--------------------------------------------------------------
With that fix above, for "default locale", the test case works (except I had to change the
"key" from "PROCESS_KEY" to "TEST_KEY" to match what was in the de.averbis.pear file).
To restate, this fix will work as long as the default-locale is used when internationalizing
the message.
If, for some reason, a different locale is required, then the user must write something like:
{code:java}
Exception e = new AnalysisEngineProcessException(MESSAGE_BUNDLE, "TEST_KEY", objects);
e.setResourceBundle(my_locale); // a new method being added
throw e; // or whatever should be done with i{code}
was (Author: schor):
With that fix above, for "default locale", the test case works (except I had to change the
"key" from "PROCESS_KEY" to "TEST_KEY" to match what was in the de.averbis.pear file).
To restate, this fix will work as long as the default-locale is used when internationalizing
the message.
If, for some reason, a different locale is required, then the user must write something like:
{code:java}
Exception e = new AnalysisEngineProcessException(MESSAGE_BUNDLE, "TEST_KEY", objects);
e.setResourceBundle(my_locale);
throw e; // or whatever should be done with i{code}
> InternationalizedException getLocalizedMessage fails in pear
> ------------------------------------------------------------
>
> Key: UIMA-5961
> URL: https://issues.apache.org/jira/browse/UIMA-5961
> Project: UIMA
> Issue Type: Bug
> Affects Versions: 2.10.3SDK
> Reporter: Matthias Koch
> Assignee: Marshall Schor
> Priority: Major
> Fix For: 2.10.4SDK
>
> Attachments: UIMA-5961.diff, peartest.zip
>
>
> localized message does not work in the case of pears. The classloader stored in the internationalizedException
is wrong. The bundle cant be found in this classloader.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
|