[JAVA-18177] Moved server modules to jdk9-and-above profile (#13523)

* [JAVA-18177]  Moved server modules to jdk9-and-above profile

* [JAVA-18177]  Upgraded maven-war-plugin version

* [JAVA-18146]  Moved json-modules to jdk9-and-above profile

* [JAVA-18151]  Moved libraries-data module to jdk9-and-above profile

* [JAVA-18176] Moved saas-modules to jdk9-and-above profile

* [JAVA-18165] Moved patterns-modules to jdk9-and-above profile

* [JAVA-18146] Fixed tests at gson module

* [JAVA-18165] Upgraded maven-war-plugin version

* [JAVA-16377] Moved apache-cxf-module to jdk9-and-above profile + comment out cxf spring

* [JAVA-18151] Testing maven compiler plugin

* [JAVA-18151] Ignored 2 test cases

* [JAVA-18151] import javassist dependency manually

* [JAVA-16377] Upgraded spring version + uncomment cxf-spring module
This commit is contained in:
panos-kakos
2023-02-26 18:25:24 +02:00
committed by GitHub
parent 3b2d9be8b3
commit 428f69a966
35 changed files with 184 additions and 82 deletions
@@ -23,8 +23,8 @@ public class GsonSerializeUnitTest {
ActorGson rudyYoungblood = new ActorGson("nm2199632", sdf.parse("21-09-1982"), Arrays.asList("Apocalypto", "Beatdown", "Wind Walkers"));
Movie movie = new Movie("tt0472043", "Mel Gibson", Arrays.asList(rudyYoungblood));
String expectedOutput = "{\"imdbId\":\"tt0472043\",\"director\":\"Mel Gibson\",\"actors\":[{\"imdbId\":\"nm2199632\",\"dateOfBirth\":\"Sep 21, 1982 12:00:00 AM\",\"filmography\":[\"Apocalypto\",\"Beatdown\",\"Wind Walkers\"]}]}";
Assert.assertEquals(new Gson().toJson(movie), expectedOutput);
String expectedOutput = "{\"imdbId\":\"tt0472043\",\"director\":\"Mel Gibson\",\"actors\":[{\"imdbId\":\"nm2199632\",\"dateOfBirth\":\"Sep 21, 1982, 12:00:00 AM\",\"filmography\":[\"Apocalypto\",\"Beatdown\",\"Wind Walkers\"]}]}";
Assert.assertEquals(expectedOutput, new Gson().toJson(movie));
}
@Test
@@ -1,7 +1,7 @@
package com.baeldung.gson.serialization.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Type;
import java.util.Collection;
@@ -88,7 +88,7 @@ public class GsonSerializationUnitTest {
String jsonDate = gson.toJson(sourceDate, sourceDateType);
System.out.println("jsonDate:\n" + jsonDate);
String expectedResult = "\"Jan 1, 2000 12:00:00 AM\"";
String expectedResult = "\"Jan 1, 2000, 12:00:00 AM\"";
assertEquals(expectedResult, jsonDate);
}
+5 -1
View File
@@ -3,7 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>json-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
@@ -119,6 +118,11 @@
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
<build>