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

Julia Kinga Marton commented on OOZIE-3505:
-------------------------------------------

Starting from Java9, the default locale handling has changed: 
[https://bugs.openjdk.java.net/browse/JDK-8206961].
 Gson uses the default US locale when it writes out data: 
[https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/internal/bind/DateTypeAdapter.java#L96]
 
[https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/internal/bind/DateTypeAdapter.java#L61]

With JDK 11
{code:java}
DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, 
Locale.US)
{code}
will return the following format "MMM d, y, h:mm:ss a" instead of "MMM, d yyyy 
h:mm:ss a", returned until now in JDK 8.

> [Java 11] Fix TestDBLoadDump
> ----------------------------
>
>                 Key: OOZIE-3505
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3505
>             Project: Oozie
>          Issue Type: Sub-task
>            Reporter: Julia Kinga Marton
>            Assignee: Julia Kinga Marton
>            Priority: Major
>         Attachments: OOZIE-3505-001.patch
>
>
> There are a couple of test cases in TestDBLoadDump which are failing with the 
> following exception with JDK11:
> {code:bash}
> org.apache.oozie.tools.TestDBLoadDump$ExitException
>  at 
> org.apache.oozie.tools.TestDBLoadDump$NoExitSecurityManager.checkExit(TestDBLoadDump.java:285)
>  at java.base/java.lang.Runtime.exit(Runtime.java:113)
>  at java.base/java.lang.System.exit(System.java:1746)
>  at org.apache.oozie.tools.OozieDBImportCLI.main(OozieDBImportCLI.java:158)
>  at org.apache.oozie.tools.TestDBLoadDump.importToDB(TestDBLoadDump.java:219)
>  at 
> org.apache.oozie.tools.TestDBLoadDump.importValidDataToDB(TestDBLoadDump.java:211)
>  at 
> org.apache.oozie.tools.TestDBLoadDump.testImportToNonExistingTablesSucceedsOnHsqldb(TestDBLoadDump.java:133)
>  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>  at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>  at junit.framework.TestCase.runTest(TestCase.java:176){code}



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

Reply via email to