[
https://issues.jboss.org/browse/ISPN-3206?page=com.atlassian.jira.plugin....
]
Galder Zamarreño updated ISPN-3206:
-----------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 5.3.0.Final
Resolution: Done
REST endpoint returns Expiry header in default locale for the server
--------------------------------------------------------------------
Key: ISPN-3206
URL:
https://issues.jboss.org/browse/ISPN-3206
Project: Infinispan
Issue Type: Bug
Affects Versions: 5.3.0.CR1
Reporter: Martin Gencur
Assignee: Martin Gencur
Fix For: 5.3.0.CR2, 5.3.0.Final
Rest endpoint uses RESTEasy to generate responses and uses .expires(date) method of the
respective response builder. However, the currently used RESTEasy version
(org.jboss.resteasy:resteasy-jaxrs:jar:2.3.2.Final) uses the server's default locale
(in my case it was cs_CZ) which caused the Expiry header to have the following format: Čt,
06 VI 2013 19:24:02 CEST (also see RESTEASY-887). OTOH, the 2.3.2 version of RESTEasy
generates Last-Modified always in US locale.
It is also causing some tests to fail on different locales than US, e.g.:
{code}
testHotRodEmbeddedPutRestGetExpiry(org.infinispan.it.compatibility.EmbeddedRestHotRodTest)
Time elapsed: 0.023 sec <<< FAILURE!
java.text.ParseException: Unparseable date: "?t, 06 VI 2013 16:32:04 CEST"
at java.text.DateFormat.parse(DateFormat.java:357)
at
org.infinispan.it.compatibility.EmbeddedRestHotRodTest.assertDate(EmbeddedRestHotRodTest.java:291)
at
org.infinispan.it.compatibility.EmbeddedRestHotRodTest.testHotRodEmbeddedPutRestGetExpiry(EmbeddedRestHotRodTest.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
{code}
We should ensure that the Expiry header is returned in US locale as well and not to be
server specific.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira