diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 08352a0..f55506d 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -11,19 +11,21 @@ on: jobs: # old-school build and jar method. No tests run or compiled. - build-1_6: + build-11: runs-on: ubuntu-latest strategy: matrix: - # build for java 1.6, however don't run any tests - java: [ 1.6 ] + # build for java 11, however don't run any tests + java: [ 11, 17, 19, 20 ] name: Java ${{ matrix.java }} steps: - - uses: actions/checkout@v2 - - name: Setup java - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: ${{ matrix.java }} + cache: 'maven' - name: Compile Java ${{ matrix.java }} run: | mkdir -p target/classes @@ -42,14 +44,16 @@ jobs: strategy: matrix: # build against supported Java LTS versions: - java: [ 8, 11 ] + java: [ 11, 17 ] name: Java ${{ matrix.java }} steps: - - uses: actions/checkout@v2 - - name: Setup java - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: ${{ matrix.java }} + cache: 'maven' - name: Compile Java ${{ matrix.java }} run: mvn clean compile -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true - name: Run Tests ${{ matrix.java }} diff --git a/pom.xml b/pom.xml index b9e0e60..d6ed899 100644 --- a/pom.xml +++ b/pom.xml @@ -69,7 +69,7 @@ org.mockito mockito-core - 1.9.5 + 4.2.0 test @@ -79,7 +79,7 @@ org.apache.felix maven-bundle-plugin - 3.0.1 + 5.1.9 true @@ -93,16 +93,16 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.11.0 - 1.6 - 1.6 + 1.8 + 1.8 org.apache.maven.plugins maven-source-plugin - 2.1.2 + 3.3.0 attach-sources @@ -115,7 +115,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.7 + 3.5.0 attach-javadocs @@ -131,7 +131,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 1.6 sign-artifacts @@ -162,7 +162,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.3.0 @@ -173,4 +173,4 @@ - + \ No newline at end of file diff --git a/src/test/java/org/json/junit/JSONObjectTest.java b/src/test/java/org/json/junit/JSONObjectTest.java index e869a8d..3250c25 100644 --- a/src/test/java/org/json/junit/JSONObjectTest.java +++ b/src/test/java/org/json/junit/JSONObjectTest.java @@ -626,9 +626,9 @@ public class JSONObjectTest { assertTrue("expected 42", Integer.valueOf("42").equals(jsonObject.query("/intKey"))); assertTrue("expected -23.45e7", Double.valueOf("-23.45e7").equals(jsonObject.query("/doubleKey"))); // sorry, mockito artifact - assertTrue("expected 2 callbacks items", ((List)(JsonPath.read(doc, "$.callbacks"))).size() == 2); - assertTrue("expected 0 handler items", ((Map)(JsonPath.read(doc, "$.callbacks[0].handler"))).size() == 0); - assertTrue("expected 0 callbacks[1] items", ((Map)(JsonPath.read(doc, "$.callbacks[1]"))).size() == 0); + assertTrue("expected 2 mockitoInterceptor items", ((Map)(JsonPath.read(doc, "$.mockitoInterceptor"))).size() == 2); + assertTrue("expected 0 mockitoInterceptor.serializationSupport items", + ((Map)(JsonPath.read(doc, "$.mockitoInterceptor.serializationSupport"))).size() == 0); Util.checkJSONObjectMaps(jsonObject); }