Skip to content

Changes

Summary

  1. Fix 2.0 for Bug 404069 - MOXy should not append .0 to time info for dateTime and time formats + unit test (#1412) (commit: 4f3c0ef) (details)
Commit 4f3c0ef9ee2daaba28030df0f552dee3f43ecb3a by GitHub
 Fix 2.0 for Bug 404069 - MOXy should not append .0 to time info for dateTime and time formats + unit test (#1412)

This new feature optionally add suffix/decimal part to time part/seconds in case of conversion from supported date/time formats into String. This suffix is controlled by new "org.eclipse.persistence.xml.time.suffix" system property.
It happens only if source time doesn't contain fraction of seconds and for XML, JSON conversion. E.g.:
For -Dorg.eclipse.persistence.xml.time.suffix=.0
Source value: 2003-08-29T03:00:00-04:00 -> Output string: 2003-08-29T03:00:00.0-04:00
Source value: 1975-02-21T07:47:15 -> Output string: 1975-02-21T07:47:15.0

In case of fraction of seconds in the input behavior is still same e.g.:
Source value: 1975-02-21T07:47:15.123 -> Output string: 1975-02-21T07:47:15.123

It simplifies migration from WebLogic Server 11g to 12c.

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
(commit: 4f3c0ef)
The file was modified foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLConversionManager.java (diff)
The file was modified moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlconversionmanager/DateAndTimeTestCases.java (diff)
The file was modified moxy/eclipselink.moxy.test/antbuild.xml (diff)
The file was addedmoxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/systemproperties/OXMSystemPropertiesNonDefaultTestCases.java
The file was addedmoxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/systemproperties/OXMSystemPropertiesTestCases.java
The file was modified foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/OXMSystemProperties.java (diff)
The file was addedmoxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/systemproperties/DateAndTimeNonDefaultTestCases.java

Summary

  1. Fix 2.0 for Bug 404069 - MOXy should not append .0 to time info for dateTime and time formats + unit test (#1412) (commit: 4f3c0ef) (details)
Commit 4f3c0ef9ee2daaba28030df0f552dee3f43ecb3a by GitHub
 Fix 2.0 for Bug 404069 - MOXy should not append .0 to time info for dateTime and time formats + unit test (#1412)

This new feature optionally add suffix/decimal part to time part/seconds in case of conversion from supported date/time formats into String. This suffix is controlled by new "org.eclipse.persistence.xml.time.suffix" system property.
It happens only if source time doesn't contain fraction of seconds and for XML, JSON conversion. E.g.:
For -Dorg.eclipse.persistence.xml.time.suffix=.0
Source value: 2003-08-29T03:00:00-04:00 -> Output string: 2003-08-29T03:00:00.0-04:00
Source value: 1975-02-21T07:47:15 -> Output string: 1975-02-21T07:47:15.0

In case of fraction of seconds in the input behavior is still same e.g.:
Source value: 1975-02-21T07:47:15.123 -> Output string: 1975-02-21T07:47:15.123

It simplifies migration from WebLogic Server 11g to 12c.

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
(commit: 4f3c0ef)
The file was modified moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlconversionmanager/DateAndTimeTestCases.java
The file was addedmoxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/systemproperties/DateAndTimeNonDefaultTestCases.java
The file was modified moxy/eclipselink.moxy.test/antbuild.xml
The file was addedmoxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/systemproperties/OXMSystemPropertiesNonDefaultTestCases.java
The file was addedmoxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/systemproperties/OXMSystemPropertiesTestCases.java
The file was modified foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/OXMSystemProperties.java
The file was modified foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLConversionManager.java