From 4376424e512d9296cc2914049f3dcf8d00d55231 Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Wed, 6 Mar 2019 07:14:23 +0000 Subject: [PATCH 1/9] Adding XMLGregorianCalendar to LocalDate converters --- .../XmlGregorianCalendarConverter.java | 29 ++++++++++++ .../XmlGregorianCalendarConverterTest.java | 44 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java create mode 100644 java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java diff --git a/java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java b/java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java new file mode 100644 index 0000000000..7f7515ec4b --- /dev/null +++ b/java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java @@ -0,0 +1,29 @@ +package com.baeldung.xmlgregoriancalendar; + +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; +import java.time.LocalDate; + +public class XmlGregorianCalendarConverter { + + public static void main(String[] args) throws DatatypeConfigurationException { + LocalDate localDate = LocalDate.now(); + System.out.println("localdate: " + localDate); + XMLGregorianCalendar xmlGregorianCalendar = fromLocalDate(localDate); + System.out.println("xmlGregorianCalendar: " + xmlGregorianCalendar); + + xmlGregorianCalendar.setTime(1, 1, 30); + System.out.println("xmlGregorianCalendar with time information: " + xmlGregorianCalendar); + LocalDate newLocalDate = fromXMLGregorianCalendar(xmlGregorianCalendar); + System.out.println("newLocalDate: " + newLocalDate); + } + + static XMLGregorianCalendar fromLocalDate(LocalDate localDate) throws DatatypeConfigurationException { + return DatatypeFactory.newInstance().newXMLGregorianCalendar(localDate.toString()); + } + + static LocalDate fromXMLGregorianCalendar(XMLGregorianCalendar xmlGregorianCalendar) { + return LocalDate.of(xmlGregorianCalendar.getYear(), xmlGregorianCalendar.getMonth(), xmlGregorianCalendar.getDay()); + } +} diff --git a/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java b/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java new file mode 100644 index 0000000000..f27c91be7e --- /dev/null +++ b/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java @@ -0,0 +1,44 @@ +package com.baeldung.xmlgregoriancalendar; + +import org.junit.Test; + +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; +import java.time.LocalDate; + +import static com.baeldung.xmlgregoriancalendar.XmlGregorianCalendarConverter.fromLocalDate; +import static com.baeldung.xmlgregoriancalendar.XmlGregorianCalendarConverter.fromXMLGregorianCalendar; +import static org.assertj.core.api.Assertions.assertThat; + +public class XmlGregorianCalendarConverterTest { + + @Test + public void fromLocalDateToXMLGregorianCalendar() throws DatatypeConfigurationException { + LocalDate localDate = LocalDate.of(2017, 4, 25); + XMLGregorianCalendar xmlGregorianCalendar = fromLocalDate(localDate); + + assertThat(xmlGregorianCalendar.getYear()).isEqualTo(localDate.getYear()); + assertThat(xmlGregorianCalendar.getMonth()).isEqualTo(localDate.getMonthValue()); + assertThat(xmlGregorianCalendar.getDay()).isEqualTo(localDate.getDayOfMonth()); + } + + @Test + public void fromXMLGregorianCalendarToLocalDate() throws DatatypeConfigurationException { + XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar("2017-04-25"); + LocalDate localDate = fromXMLGregorianCalendar(xmlGregorianCalendar); + + assertThat(localDate.getYear()).isEqualTo(xmlGregorianCalendar.getYear()); + assertThat(localDate.getMonthValue()).isEqualTo(xmlGregorianCalendar.getMonth()); + assertThat(localDate.getDayOfMonth()).isEqualTo(xmlGregorianCalendar.getDay()); + } + + @Test + public void compositionOfFunctionsIsIdentity() throws DatatypeConfigurationException { // Only if we don't consider time + LocalDate localDate = LocalDate.of(2017, 4, 25); + XMLGregorianCalendar xmlGregorianCalendar = fromLocalDate(localDate); + LocalDate resultDate = fromXMLGregorianCalendar(xmlGregorianCalendar); + + assertThat(resultDate).isEqualTo(localDate); + } +} From 9fae5f5a50f3cca4738b8ef0fd1346c8dc2be781 Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Sun, 10 Mar 2019 17:40:04 +0000 Subject: [PATCH 2/9] BAEL-2522 - Comments addressed. --- .../XmlGregorianCalendarConverter.java | 29 ------------------- .../XmlGregorianCalendarConverterTest.java | 14 ++------- 2 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java diff --git a/java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java b/java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java deleted file mode 100644 index 7f7515ec4b..0000000000 --- a/java-dates/src/main/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverter.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.baeldung.xmlgregoriancalendar; - -import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.XMLGregorianCalendar; -import java.time.LocalDate; - -public class XmlGregorianCalendarConverter { - - public static void main(String[] args) throws DatatypeConfigurationException { - LocalDate localDate = LocalDate.now(); - System.out.println("localdate: " + localDate); - XMLGregorianCalendar xmlGregorianCalendar = fromLocalDate(localDate); - System.out.println("xmlGregorianCalendar: " + xmlGregorianCalendar); - - xmlGregorianCalendar.setTime(1, 1, 30); - System.out.println("xmlGregorianCalendar with time information: " + xmlGregorianCalendar); - LocalDate newLocalDate = fromXMLGregorianCalendar(xmlGregorianCalendar); - System.out.println("newLocalDate: " + newLocalDate); - } - - static XMLGregorianCalendar fromLocalDate(LocalDate localDate) throws DatatypeConfigurationException { - return DatatypeFactory.newInstance().newXMLGregorianCalendar(localDate.toString()); - } - - static LocalDate fromXMLGregorianCalendar(XMLGregorianCalendar xmlGregorianCalendar) { - return LocalDate.of(xmlGregorianCalendar.getYear(), xmlGregorianCalendar.getMonth(), xmlGregorianCalendar.getDay()); - } -} diff --git a/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java b/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java index f27c91be7e..7fe1cd36a1 100644 --- a/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java +++ b/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java @@ -16,7 +16,7 @@ public class XmlGregorianCalendarConverterTest { @Test public void fromLocalDateToXMLGregorianCalendar() throws DatatypeConfigurationException { LocalDate localDate = LocalDate.of(2017, 4, 25); - XMLGregorianCalendar xmlGregorianCalendar = fromLocalDate(localDate); + XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(localDate.toString()); assertThat(xmlGregorianCalendar.getYear()).isEqualTo(localDate.getYear()); assertThat(xmlGregorianCalendar.getMonth()).isEqualTo(localDate.getMonthValue()); @@ -26,19 +26,11 @@ public class XmlGregorianCalendarConverterTest { @Test public void fromXMLGregorianCalendarToLocalDate() throws DatatypeConfigurationException { XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar("2017-04-25"); - LocalDate localDate = fromXMLGregorianCalendar(xmlGregorianCalendar); + LocalDate localDate = LocalDate.of(xmlGregorianCalendar.getYear(), xmlGregorianCalendar.getMonth(), xmlGregorianCalendar.getDay()); assertThat(localDate.getYear()).isEqualTo(xmlGregorianCalendar.getYear()); assertThat(localDate.getMonthValue()).isEqualTo(xmlGregorianCalendar.getMonth()); assertThat(localDate.getDayOfMonth()).isEqualTo(xmlGregorianCalendar.getDay()); } - - @Test - public void compositionOfFunctionsIsIdentity() throws DatatypeConfigurationException { // Only if we don't consider time - LocalDate localDate = LocalDate.of(2017, 4, 25); - XMLGregorianCalendar xmlGregorianCalendar = fromLocalDate(localDate); - LocalDate resultDate = fromXMLGregorianCalendar(xmlGregorianCalendar); - - assertThat(resultDate).isEqualTo(localDate); - } + } From 6869885cf415e7268adca1ff1426cb8dd2d47993 Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Wed, 13 Mar 2019 19:45:09 +0000 Subject: [PATCH 3/9] BAEL-2522 Moved to another module --- java-dates-2/.gitignore | 29 ++++++++++ java-dates-2/pom.xml | 55 +++++++++++++++++++ ...XmlGregorianCalendarConverterUnitTest.java | 6 +- 3 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 java-dates-2/.gitignore create mode 100644 java-dates-2/pom.xml rename java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java => java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java (85%) diff --git a/java-dates-2/.gitignore b/java-dates-2/.gitignore new file mode 100644 index 0000000000..6471aabbcf --- /dev/null +++ b/java-dates-2/.gitignore @@ -0,0 +1,29 @@ +*.class + +0.* + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* +.resourceCache + +# Packaged files # +*.jar +*.war +*.ear + +# Files generated by integration tests +*.txt +backup-pom.xml +/bin/ +/temp + +#IntelliJ specific +.idea/ +*.iml + +#jenv +.java-version \ No newline at end of file diff --git a/java-dates-2/pom.xml b/java-dates-2/pom.xml new file mode 100644 index 0000000000..93216e3ffa --- /dev/null +++ b/java-dates-2/pom.xml @@ -0,0 +1,55 @@ + + 4.0.0 + com.baeldung + java-dates-2 + 0.1.0-SNAPSHOT + jar + java-dates-2 + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../parent-java + + + + + + org.assertj + assertj-core + ${assertj.version} + test + + + + + java-dates-2 + + + src/main/resources + true + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + + 3.6.1 + 1.9 + 1.9 + + diff --git a/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java b/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java similarity index 85% rename from java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java rename to java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java index 7fe1cd36a1..34510a3167 100644 --- a/java-dates/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterTest.java +++ b/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java @@ -7,11 +7,9 @@ import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.XMLGregorianCalendar; import java.time.LocalDate; -import static com.baeldung.xmlgregoriancalendar.XmlGregorianCalendarConverter.fromLocalDate; -import static com.baeldung.xmlgregoriancalendar.XmlGregorianCalendarConverter.fromXMLGregorianCalendar; import static org.assertj.core.api.Assertions.assertThat; -public class XmlGregorianCalendarConverterTest { +public class XmlGregorianCalendarConverterUnitTest { @Test public void fromLocalDateToXMLGregorianCalendar() throws DatatypeConfigurationException { @@ -32,5 +30,5 @@ public class XmlGregorianCalendarConverterTest { assertThat(localDate.getMonthValue()).isEqualTo(xmlGregorianCalendar.getMonth()); assertThat(localDate.getDayOfMonth()).isEqualTo(xmlGregorianCalendar.getDay()); } - + } From f90dd073cb63e823d6563826d4d5b12aadaed49c Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Thu, 14 Mar 2019 09:32:06 +0000 Subject: [PATCH 4/9] BAEL-2522 - Updated parent pom with the new module --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 58d57ade05..ac1273b28d 100644 --- a/pom.xml +++ b/pom.xml @@ -440,6 +440,7 @@ java-collections-conversions java-collections-maps + java-dates-2 java-lite java-numbers From bac1103dccb43872ff84e7b3598bfc7916b927a9 Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Fri, 15 Mar 2019 14:38:26 +0000 Subject: [PATCH 5/9] BAEL-2522 - Reverting changes --- java-dates-2/.gitignore | 29 ---------- java-dates-2/pom.xml | 55 ------------------- ...XmlGregorianCalendarConverterUnitTest.java | 34 ------------ pom.xml | 1 - 4 files changed, 119 deletions(-) delete mode 100644 java-dates-2/.gitignore delete mode 100644 java-dates-2/pom.xml delete mode 100644 java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java diff --git a/java-dates-2/.gitignore b/java-dates-2/.gitignore deleted file mode 100644 index 6471aabbcf..0000000000 --- a/java-dates-2/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -*.class - -0.* - -#folders# -/target -/neoDb* -/data -/src/main/webapp/WEB-INF/classes -*/META-INF/* -.resourceCache - -# Packaged files # -*.jar -*.war -*.ear - -# Files generated by integration tests -*.txt -backup-pom.xml -/bin/ -/temp - -#IntelliJ specific -.idea/ -*.iml - -#jenv -.java-version \ No newline at end of file diff --git a/java-dates-2/pom.xml b/java-dates-2/pom.xml deleted file mode 100644 index 93216e3ffa..0000000000 --- a/java-dates-2/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - 4.0.0 - com.baeldung - java-dates-2 - 0.1.0-SNAPSHOT - jar - java-dates-2 - - - com.baeldung - parent-java - 0.0.1-SNAPSHOT - ../parent-java - - - - - - org.assertj - assertj-core - ${assertj.version} - test - - - - - java-dates-2 - - - src/main/resources - true - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${maven.compiler.source} - ${maven.compiler.target} - - - - - - - - 3.6.1 - 1.9 - 1.9 - - diff --git a/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java b/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java deleted file mode 100644 index 34510a3167..0000000000 --- a/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.baeldung.xmlgregoriancalendar; - -import org.junit.Test; - -import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.XMLGregorianCalendar; -import java.time.LocalDate; - -import static org.assertj.core.api.Assertions.assertThat; - -public class XmlGregorianCalendarConverterUnitTest { - - @Test - public void fromLocalDateToXMLGregorianCalendar() throws DatatypeConfigurationException { - LocalDate localDate = LocalDate.of(2017, 4, 25); - XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(localDate.toString()); - - assertThat(xmlGregorianCalendar.getYear()).isEqualTo(localDate.getYear()); - assertThat(xmlGregorianCalendar.getMonth()).isEqualTo(localDate.getMonthValue()); - assertThat(xmlGregorianCalendar.getDay()).isEqualTo(localDate.getDayOfMonth()); - } - - @Test - public void fromXMLGregorianCalendarToLocalDate() throws DatatypeConfigurationException { - XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar("2017-04-25"); - LocalDate localDate = LocalDate.of(xmlGregorianCalendar.getYear(), xmlGregorianCalendar.getMonth(), xmlGregorianCalendar.getDay()); - - assertThat(localDate.getYear()).isEqualTo(xmlGregorianCalendar.getYear()); - assertThat(localDate.getMonthValue()).isEqualTo(xmlGregorianCalendar.getMonth()); - assertThat(localDate.getDayOfMonth()).isEqualTo(xmlGregorianCalendar.getDay()); - } - -} diff --git a/pom.xml b/pom.xml index ac1273b28d..58d57ade05 100644 --- a/pom.xml +++ b/pom.xml @@ -440,7 +440,6 @@ java-collections-conversions java-collections-maps - java-dates-2 java-lite java-numbers From d5e91a8d341ee6e937061c20db9e17d0b8594a8c Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Sat, 16 Mar 2019 22:15:22 +0000 Subject: [PATCH 6/9] Revert "BAEL-2522 - Reverting changes" This reverts commit bac1103dccb43872ff84e7b3598bfc7916b927a9. --- java-dates-2/.gitignore | 29 ++++++++++ java-dates-2/pom.xml | 55 +++++++++++++++++++ ...XmlGregorianCalendarConverterUnitTest.java | 34 ++++++++++++ pom.xml | 1 + 4 files changed, 119 insertions(+) create mode 100644 java-dates-2/.gitignore create mode 100644 java-dates-2/pom.xml create mode 100644 java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java diff --git a/java-dates-2/.gitignore b/java-dates-2/.gitignore new file mode 100644 index 0000000000..6471aabbcf --- /dev/null +++ b/java-dates-2/.gitignore @@ -0,0 +1,29 @@ +*.class + +0.* + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* +.resourceCache + +# Packaged files # +*.jar +*.war +*.ear + +# Files generated by integration tests +*.txt +backup-pom.xml +/bin/ +/temp + +#IntelliJ specific +.idea/ +*.iml + +#jenv +.java-version \ No newline at end of file diff --git a/java-dates-2/pom.xml b/java-dates-2/pom.xml new file mode 100644 index 0000000000..93216e3ffa --- /dev/null +++ b/java-dates-2/pom.xml @@ -0,0 +1,55 @@ + + 4.0.0 + com.baeldung + java-dates-2 + 0.1.0-SNAPSHOT + jar + java-dates-2 + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../parent-java + + + + + + org.assertj + assertj-core + ${assertj.version} + test + + + + + java-dates-2 + + + src/main/resources + true + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + + 3.6.1 + 1.9 + 1.9 + + diff --git a/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java b/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java new file mode 100644 index 0000000000..34510a3167 --- /dev/null +++ b/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java @@ -0,0 +1,34 @@ +package com.baeldung.xmlgregoriancalendar; + +import org.junit.Test; + +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; +import java.time.LocalDate; + +import static org.assertj.core.api.Assertions.assertThat; + +public class XmlGregorianCalendarConverterUnitTest { + + @Test + public void fromLocalDateToXMLGregorianCalendar() throws DatatypeConfigurationException { + LocalDate localDate = LocalDate.of(2017, 4, 25); + XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(localDate.toString()); + + assertThat(xmlGregorianCalendar.getYear()).isEqualTo(localDate.getYear()); + assertThat(xmlGregorianCalendar.getMonth()).isEqualTo(localDate.getMonthValue()); + assertThat(xmlGregorianCalendar.getDay()).isEqualTo(localDate.getDayOfMonth()); + } + + @Test + public void fromXMLGregorianCalendarToLocalDate() throws DatatypeConfigurationException { + XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar("2017-04-25"); + LocalDate localDate = LocalDate.of(xmlGregorianCalendar.getYear(), xmlGregorianCalendar.getMonth(), xmlGregorianCalendar.getDay()); + + assertThat(localDate.getYear()).isEqualTo(xmlGregorianCalendar.getYear()); + assertThat(localDate.getMonthValue()).isEqualTo(xmlGregorianCalendar.getMonth()); + assertThat(localDate.getDayOfMonth()).isEqualTo(xmlGregorianCalendar.getDay()); + } + +} diff --git a/pom.xml b/pom.xml index 58d57ade05..ac1273b28d 100644 --- a/pom.xml +++ b/pom.xml @@ -440,6 +440,7 @@ java-collections-conversions java-collections-maps + java-dates-2 java-lite java-numbers From 227ad26d0bd09869f76c631a02b90e3056987f04 Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Sat, 16 Mar 2019 22:16:48 +0000 Subject: [PATCH 7/9] BAEL-2522 - Commenting module --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ac1273b28d..d6a43db409 100644 --- a/pom.xml +++ b/pom.xml @@ -440,7 +440,7 @@ java-collections-conversions java-collections-maps - java-dates-2 + java-lite java-numbers From 384dad60f19e5b4781d5ac64ac18db1a8a3c9801 Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Mon, 18 Mar 2019 20:19:37 +0000 Subject: [PATCH 8/9] BAEL-2522 Kevin comments addressed --- .../XmlGregorianCalendarConverterUnitTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java b/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java index 34510a3167..b221c04199 100644 --- a/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java +++ b/java-dates-2/src/test/java/com/baeldung/xmlgregoriancalendar/XmlGregorianCalendarConverterUnitTest.java @@ -3,6 +3,7 @@ package com.baeldung.xmlgregoriancalendar; import org.junit.Test; import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.XMLGregorianCalendar; import java.time.LocalDate; @@ -19,6 +20,7 @@ public class XmlGregorianCalendarConverterUnitTest { assertThat(xmlGregorianCalendar.getYear()).isEqualTo(localDate.getYear()); assertThat(xmlGregorianCalendar.getMonth()).isEqualTo(localDate.getMonthValue()); assertThat(xmlGregorianCalendar.getDay()).isEqualTo(localDate.getDayOfMonth()); + assertThat(xmlGregorianCalendar.getTimezone()).isEqualTo(DatatypeConstants.FIELD_UNDEFINED); } @Test From 1f857d5ad515859185292779fe37436e3e07fb31 Mon Sep 17 00:00:00 2001 From: Antonio Moreno Date: Wed, 20 Mar 2019 16:00:42 +0000 Subject: [PATCH 9/9] BAEL-2522 - Tabs problem. Identation. --- java-dates-2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-dates-2/pom.xml b/java-dates-2/pom.xml index 93216e3ffa..c2464ed47f 100644 --- a/java-dates-2/pom.xml +++ b/java-dates-2/pom.xml @@ -49,7 +49,7 @@ 3.6.1 - 1.9 + 1.9 1.9