From fda87c3933ab0dc6402b2453a691457df1e66554 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 19 May 2022 14:05:27 +0200 Subject: [PATCH 01/24] #376: JsonProviderTest fails if run after other Junits in a test suite Signed-off-by: Lukas Jungmann --- .../jsonp/api/provider/JsonProviderTest.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tck/tck-tests/src/main/java/ee/jakarta/tck/jsonp/api/provider/JsonProviderTest.java b/tck/tck-tests/src/main/java/ee/jakarta/tck/jsonp/api/provider/JsonProviderTest.java index 6cb37497..17731d23 100644 --- a/tck/tck-tests/src/main/java/ee/jakarta/tck/jsonp/api/provider/JsonProviderTest.java +++ b/tck/tck-tests/src/main/java/ee/jakarta/tck/jsonp/api/provider/JsonProviderTest.java @@ -34,6 +34,8 @@ import jakarta.json.stream.JsonGeneratorFactory; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParserFactory; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -46,7 +48,23 @@ public class JsonProviderTest { private static final String JSONP_PROVIDER_FACTORY = "jakarta.json.provider"; - + private String factoryValue; + + @BeforeEach + public void setUp() { + factoryValue = System.getProperty(JSONP_PROVIDER_FACTORY); + System.clearProperty(JSONP_PROVIDER_FACTORY); + } + + @AfterEach + public void reset() { + if (factoryValue != null) { + System.setProperty(JSONP_PROVIDER_FACTORY, factoryValue); + } else { + System.clearProperty(JSONP_PROVIDER_FACTORY); + } + } + /** * Verifies it is possible to obtain the JsonProvider implementation from a System property. */ From df40e20a4ffb815dd50557402bb62c0844a9085a Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 19 May 2022 17:46:50 +0200 Subject: [PATCH 02/24] simplify the provider lookup, add logging Signed-off-by: Lukas Jungmann --- .../java/jakarta/json/spi/JsonProvider.java | 96 +++++++++---------- api/src/main/java/module-info.java | 1 + 2 files changed, 46 insertions(+), 51 deletions(-) diff --git a/api/src/main/java/jakarta/json/spi/JsonProvider.java b/api/src/main/java/jakarta/json/spi/JsonProvider.java index 13f89dbc..02ca9045 100644 --- a/api/src/main/java/jakarta/json/spi/JsonProvider.java +++ b/api/src/main/java/jakarta/json/spi/JsonProvider.java @@ -23,11 +23,15 @@ import java.lang.reflect.Method; import java.math.BigDecimal; import java.math.BigInteger; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.Collection; import java.util.Iterator; import java.util.Map; import java.util.Optional; import java.util.ServiceLoader; +import java.util.logging.Level; +import java.util.logging.Logger; import jakarta.json.JsonArray; import jakarta.json.JsonArrayBuilder; @@ -74,6 +78,9 @@ public abstract class JsonProvider { private static final String DEFAULT_PROVIDER = "org.eclipse.parsson.JsonProviderImpl"; + /** A logger */ + private static final Logger LOG = Logger.getLogger(JsonProvider.class.getName()); + /** * Default constructor. */ @@ -100,48 +107,62 @@ protected JsonProvider() { * @return a JSON provider */ public static JsonProvider provider() { - if (LazyFactoryLoader.JSON_PROVIDER != null) { - return newInstance(LazyFactoryLoader.JSON_PROVIDER); + LOG.log(Level.FINE, "Checking system property {0}", JSONP_PROVIDER_FACTORY); + final String factoryClassName = System.getSecurityManager() != null + ? AccessController.doPrivileged((PrivilegedAction) () -> System.getProperty(JSONP_PROVIDER_FACTORY)) + : System.getProperty(JSONP_PROVIDER_FACTORY); + if (factoryClassName != null) { + JsonProvider provider = newInstance(factoryClassName); + LOG.log(Level.FINE, "System property used; returning object [{0}]", + provider.getClass().getName()); + return provider; } + + LOG.log(Level.FINE, "Checking ServiceLoader"); ServiceLoader loader = ServiceLoader.load(JsonProvider.class); Iterator it = loader.iterator(); if (it.hasNext()) { - return it.next(); + JsonProvider provider = it.next(); + LOG.log(Level.FINE, "ServiceLoader loading Facility used; returning object [{0}]", + provider.getClass().getName()); + return provider; } // handling OSGi (specific default) if (isOsgi()) { - JsonProvider result = lookupUsingOSGiServiceLoader(JsonProvider.class); - if (result != null) { - return result; + LOG.log(Level.FINE, "Checking OSGi"); + JsonProvider provider = lookupUsingOSGiServiceLoader(JsonProvider.class); + if (provider != null) { + LOG.log(Level.FINE, "OSGi loading facility used; returning object [{0}].", + provider.getClass().getName()); + return provider; } } - try { - Class clazz = Class.forName(DEFAULT_PROVIDER); - return (JsonProvider) clazz.getConstructor().newInstance(); - } catch (ClassNotFoundException x) { - throw new JsonException( - "Provider " + DEFAULT_PROVIDER + " not found", x); - } catch (Exception x) { - throw new JsonException( - "Provider " + DEFAULT_PROVIDER + " could not be instantiated: " + x, - x); - } + // else no provider found + LOG.fine("Trying to create the platform default provider"); + return newInstance(DEFAULT_PROVIDER); } /** * Creates a new instance from the specified class - * @param clazz class to instance + * @param className class to instantiate * @return the JsonProvider instance * @throws IllegalArgumentException for reflection issues */ - private static JsonProvider newInstance(Class clazz) { - checkPackageAccess(clazz.getName()); + private static JsonProvider newInstance(String className) { try { + checkPackageAccess(className); + @SuppressWarnings({"unchecked"}) + Class clazz = (Class) Class.forName(className); return clazz.getConstructor().newInstance(); - } catch (ReflectiveOperationException e) { - throw new IllegalArgumentException("Unable to create " + clazz.getName(), e); + } catch (ClassNotFoundException x) { + throw new JsonException( + "Provider " + DEFAULT_PROVIDER + " not found", x); + } catch (Exception x) { + throw new JsonException( + "Provider " + DEFAULT_PROVIDER + " could not be instantiated: " + x, + x); } } @@ -617,37 +638,10 @@ private static T lookupUsingOSGiServiceLoader(Class serviceClas @SuppressWarnings({"unchecked"}) Iterator iter = ((Iterable) m.invoke(null, (Object[]) args)).iterator(); return iter.hasNext() ? iter.next() : null; - } catch (Exception ignored) { - // log and continue + } catch (Exception ex) { + LOG.log(Level.FINE, "Unable to find from OSGi: [" + serviceClass.getName() + "]", ex); return null; } } - /** - * Lazy loads the class specified in System property with the key JSONP_PROVIDER_FACTORY. - * If no property is set, the value of {@link #JSON_PROVIDER} will be null. - * In case of errors an IllegalStateException is thrown. - * - */ - @SuppressWarnings("unchecked") - private static class LazyFactoryLoader { - - /** - * JSON provider class - */ - private static final Class JSON_PROVIDER; - - static { - String className = System.getProperty(JSONP_PROVIDER_FACTORY); - if (className != null) { - try { - JSON_PROVIDER = (Class) Class.forName(className); - } catch (ReflectiveOperationException e) { - throw new IllegalStateException("Unable to create " + className, e); - } - } else { - JSON_PROVIDER = null; - } - } - } } diff --git a/api/src/main/java/module-info.java b/api/src/main/java/module-info.java index 12cd6ba9..4ff532f5 100644 --- a/api/src/main/java/module-info.java +++ b/api/src/main/java/module-info.java @@ -18,6 +18,7 @@ * Jakarta JSON Processing API. */ module jakarta.json { + requires java.logging; exports jakarta.json; exports jakarta.json.spi; exports jakarta.json.stream; From 0cbe3723caf3e8135f1f8d3ffd7349d5ba36a9c0 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 19 May 2022 18:09:34 +0200 Subject: [PATCH 03/24] cpright Signed-off-by: Lukas Jungmann --- api/src/main/java/module-info.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/module-info.java b/api/src/main/java/module-info.java index 4ff532f5..aad8a0e0 100644 --- a/api/src/main/java/module-info.java +++ b/api/src/main/java/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at From f278212fc376798aa933746592904c789bf576cb Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 19 May 2022 18:19:31 +0200 Subject: [PATCH 04/24] fix exception message Signed-off-by: Lukas Jungmann --- api/src/main/java/jakarta/json/spi/JsonProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/jakarta/json/spi/JsonProvider.java b/api/src/main/java/jakarta/json/spi/JsonProvider.java index 02ca9045..4587f77d 100644 --- a/api/src/main/java/jakarta/json/spi/JsonProvider.java +++ b/api/src/main/java/jakarta/json/spi/JsonProvider.java @@ -158,10 +158,10 @@ private static JsonProvider newInstance(String className) { return clazz.getConstructor().newInstance(); } catch (ClassNotFoundException x) { throw new JsonException( - "Provider " + DEFAULT_PROVIDER + " not found", x); + "Provider " + className + " not found", x); } catch (Exception x) { throw new JsonException( - "Provider " + DEFAULT_PROVIDER + " could not be instantiated: " + x, + "Provider " + className + " could not be instantiated: " + x, x); } } From fc14a6e8f821997038ad57d25dc15559baa4fd65 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 19 May 2022 18:21:49 +0200 Subject: [PATCH 05/24] fix javadoc Signed-off-by: Lukas Jungmann --- api/src/main/java/jakarta/json/spi/JsonProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/jakarta/json/spi/JsonProvider.java b/api/src/main/java/jakarta/json/spi/JsonProvider.java index 4587f77d..28fe280a 100644 --- a/api/src/main/java/jakarta/json/spi/JsonProvider.java +++ b/api/src/main/java/jakarta/json/spi/JsonProvider.java @@ -146,9 +146,9 @@ public static JsonProvider provider() { /** * Creates a new instance from the specified class - * @param className class to instantiate + * @param className name of the class to instantiate * @return the JsonProvider instance - * @throws IllegalArgumentException for reflection issues + * @throws JsonException for issues during creation of an instance of the JsonProvider */ private static JsonProvider newInstance(String className) { try { From 83493a354619f00e5c8cfecbc3b7e333aa4cafd9 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 19 May 2022 18:28:07 +0200 Subject: [PATCH 06/24] update build plugins Signed-off-by: Lukas Jungmann --- api/pom.xml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 61599d92..d1130256 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -83,7 +83,7 @@ ${project.basedir}/../etc/spotbugs-exclude.xml false Low - 4.3.0 + 4.7.1.0 false jakarta.json @@ -95,20 +95,15 @@ - - org.commonjava.maven.plugins - directory-maven-plugin - 0.3.1 - org.codehaus.mojo buildnumber-maven-plugin - 1.4 + 3.0.0 org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 org.glassfish.copyright @@ -118,7 +113,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 org.glassfish.build @@ -128,7 +123,7 @@ org.apache.felix maven-bundle-plugin - 5.1.1 + 5.1.7 <_noextraheaders>true @@ -138,7 +133,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 org.apache.maven.plugins @@ -148,12 +143,12 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.0 + 3.4.0 org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.1.0 com.github.spotbugs @@ -402,7 +397,6 @@ Use is subject to com.github.spotbugs spotbugs-maven-plugin - true true ${spotbugs.exclude} High From 1b1f53188e24e34e6514ec8011fd5217e69b80cf Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 19 May 2022 14:59:00 +0200 Subject: [PATCH 07/24] remove obsolete tck runner belonging to the implementation project(s) Signed-off-by: Lukas Jungmann --- impl-tck/pom.xml | 65 ------------- impl-tck/tck-tests-pluggability/pom.xml | 63 ------------ impl-tck/tck-tests/pom.xml | 122 ------------------------ 3 files changed, 250 deletions(-) delete mode 100644 impl-tck/pom.xml delete mode 100644 impl-tck/tck-tests-pluggability/pom.xml delete mode 100644 impl-tck/tck-tests/pom.xml diff --git a/impl-tck/pom.xml b/impl-tck/pom.xml deleted file mode 100644 index ebe4884a..00000000 --- a/impl-tck/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 4.0.0 - - org.eclipse.jsonp - tck-project - 2.1.0-SNAPSHOT - pom - - - tck-tests - tck-tests-pluggability - - - - 2.1.0 - 1.1.0 - 2.1.0-SNAPSHOT - - - - - - - - org.eclipse.parsson - parsson - ${jsonp-impl.version} - test - - - - - - - - - - - diff --git a/impl-tck/tck-tests-pluggability/pom.xml b/impl-tck/tck-tests-pluggability/pom.xml deleted file mode 100644 index f5fa1650..00000000 --- a/impl-tck/tck-tests-pluggability/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - 4.0.0 - - - org.eclipse.jsonp - tck-project - 2.1.0-SNAPSHOT - - - jakarta.json-tck-tests-pluggability - - - - jakarta.json - jakarta.json-tck-tests-pluggability - ${jsonp-tck.version} - test - - - jakarta.json - jakarta.json-tck-common - ${jsonp-tck.version} - test - - - - - - - maven-surefire-plugin - 3.0.0-M4 - - - jakarta.json:jakarta.json-tck-tests-pluggability - - false - true - - - - - diff --git a/impl-tck/tck-tests/pom.xml b/impl-tck/tck-tests/pom.xml deleted file mode 100644 index 3e376a4c..00000000 --- a/impl-tck/tck-tests/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - 4.0.0 - - - org.eclipse.jsonp - tck-project - 2.1.0-SNAPSHOT - - - jakarta.json-tck-tests - - - - jakarta.json - jakarta.json-tck-tests - ${jsonp-tck.version} - test - - - jakarta.json - jakarta.json-tck-common - ${jsonp-tck.version} - test - - - org.netbeans.tools - sigtest-maven-plugin - 1.4 - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.2.0 - - - copy - generate-test-sources - - copy - - - - - jakarta.json - jakarta.json-api - ${jsonp-api.version} - jar - true - ${project.build.directory}/signaturedirectory - jakarta.json-api.jar - - - - - - - - maven-surefire-plugin - 3.0.0-M4 - - - jakarta.json:jakarta.json-tck-tests - - false - true - 1 - false - - - - sigtests - - test - - - - **/JSONPSigTest.java - - - ${project.build.directory}/jdk11-bundle - ${project.build.directory}/signaturedirectory/jakarta.json-api.jar:${project.build.directory}/jdk11-bundle/java.base:${project.build.directory}/jdk11-bundle/java.rmi:${project.build.directory}/jdk11-bundle/java.sql:${project.build.directory}/jdk11-bundle/java.naming - - - - - default-test - - - **/JSONPSigTest.java - - - - - - - - From 04b4354e7fe1776ec69968720240f8a2ed174784 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 21 Jul 2022 09:42:01 +0200 Subject: [PATCH 08/24] make the build jdk18 friendly (no comp warnings) Signed-off-by: Lukas Jungmann --- api/src/main/java/jakarta/json/EmptyArray.java | 5 ++++- api/src/main/java/jakarta/json/EmptyObject.java | 5 ++++- .../main/java/jakarta/json/stream/JsonParsingException.java | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/jakarta/json/EmptyArray.java b/api/src/main/java/jakarta/json/EmptyArray.java index fcc3f5a7..1d627c3f 100644 --- a/api/src/main/java/jakarta/json/EmptyArray.java +++ b/api/src/main/java/jakarta/json/EmptyArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -32,6 +32,9 @@ final class EmptyArray extends AbstractList implements JsonArray, Ser /** for serialization */ private static final long serialVersionUID = 7295439472061642859L; + /** Default constructor. */ + EmptyArray() {} + @Override public JsonValue get(int index) { throw new IndexOutOfBoundsException("Index: " + index); diff --git a/api/src/main/java/jakarta/json/EmptyObject.java b/api/src/main/java/jakarta/json/EmptyObject.java index f8c4aa8d..5210318b 100644 --- a/api/src/main/java/jakarta/json/EmptyObject.java +++ b/api/src/main/java/jakarta/json/EmptyObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -31,6 +31,9 @@ final class EmptyObject extends AbstractMap implements JsonOb /** for serialization */ private static final long serialVersionUID = -1461653546889072583L; + /** Default constructor. */ + EmptyObject() {} + @Override public Set> entrySet() { return Collections.>emptySet(); diff --git a/api/src/main/java/jakarta/json/stream/JsonParsingException.java b/api/src/main/java/jakarta/json/stream/JsonParsingException.java index 06c52c6d..c657083e 100644 --- a/api/src/main/java/jakarta/json/stream/JsonParsingException.java +++ b/api/src/main/java/jakarta/json/stream/JsonParsingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -30,7 +30,7 @@ public class JsonParsingException extends JsonException { /** * The location of the incorrect JSON. */ - private final JsonLocation location; + private transient final JsonLocation location; /** * Constructs a new runtime exception with the specified detail message. From d63dc1136a6dd3975d39c51ce946d06ebd2d4acb Mon Sep 17 00:00:00 2001 From: Eclipse JSON-P Bot Date: Thu, 21 Jul 2022 07:49:11 +0000 Subject: [PATCH 09/24] Update API version of jakarta.json:jsonp to 2.1.1 --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index d1130256..c05b4fb7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -30,7 +30,7 @@ jakarta.json jakarta.json-api - 2.1.1-SNAPSHOT + 2.1.1 Jakarta JSON Processing API Jakarta JSON Processing defines a Java(R) based framework for parsing, generating, transforming, and querying JSON documents. https://github.com/eclipse-ee4j/jsonp From dd36904bcd631c2ff122c766dd5bcc3454088aa9 Mon Sep 17 00:00:00 2001 From: Eclipse JSON-P Bot Date: Thu, 21 Jul 2022 07:50:17 +0000 Subject: [PATCH 10/24] Update API version of jakarta.json:jsonp to 2.1.2-SNAPSHOT --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index c05b4fb7..0d75186d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -30,7 +30,7 @@ jakarta.json jakarta.json-api - 2.1.1 + 2.1.2-SNAPSHOT Jakarta JSON Processing API Jakarta JSON Processing defines a Java(R) based framework for parsing, generating, transforming, and querying JSON documents. https://github.com/eclipse-ee4j/jsonp From 713fc692f24823f2280aceeb471ad6e45851a21b Mon Sep 17 00:00:00 2001 From: Jorge Bescos Gascon Date: Thu, 24 Nov 2022 08:25:52 +0100 Subject: [PATCH 11/24] Wrong version 53 package-info Signed-off-by: Jorge Bescos Gascon --- api/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/pom.xml b/api/pom.xml index 0d75186d..c01010c6 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -265,6 +265,7 @@ maven-compiler-plugin 9 + false -Xlint:all -Xdoclint:all @@ -281,6 +282,7 @@ 8 + true module-info.java From a75c9ab8455c4d04b787a6eb18fde5b855ba632c Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Wed, 21 Dec 2022 12:51:37 +0100 Subject: [PATCH 12/24] fix JsonParser javadoc Signed-off-by: Marc Wrobel --- api/src/main/java/jakarta/json/stream/JsonParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/jakarta/json/stream/JsonParser.java b/api/src/main/java/jakarta/json/stream/JsonParser.java index 0f718492..bd41d204 100644 --- a/api/src/main/java/jakarta/json/stream/JsonParser.java +++ b/api/src/main/java/jakarta/json/stream/JsonParser.java @@ -128,7 +128,7 @@ * while (parser.hasNext() { * Event event = parser.next(); * if (event == JsonParser.Event.KEY_NAME ) { - * String key = getString(); + * String key = parser.getString(); * event = parser.next(); * if (key.equals("phoneNumber") { * JsonArray phones = parser.getArray(); From 81184d480776346da4d9cc9217cd555aa854e2fa Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 11 May 2023 12:56:35 +0200 Subject: [PATCH 13/24] update build plugins Signed-off-by: Lukas Jungmann --- api/pom.xml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index c01010c6..adf50472 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -1,7 +1,7 @@ + =1.0.0)(!(version>=2.0.0)))";resolution:=optional, + osgi.serviceloader; + filter:="(osgi.serviceloader=jakarta.json.spi.JsonProvider"; + osgi.serviceloader="jakarta.json.spi.JsonProvider"; + cardinality:=multiple;resolution:=optional + ]]> + From ed5c55c679cdb5eeadd3c90545255f44f920ed10 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Thu, 13 Jul 2023 10:36:43 +0200 Subject: [PATCH 18/24] update parent, build plugins Signed-off-by: Lukas Jungmann --- api/pom.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 9b708aa8..0781dd53 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -23,7 +23,7 @@ org.eclipse.ee4j project - 1.0.7 + 1.0.8 @@ -83,7 +83,7 @@ ${project.basedir}/../etc/spotbugs-exclude.xml false Low - 4.7.3.4 + 4.7.3.5 false jakarta.json @@ -98,12 +98,12 @@ org.codehaus.mojo buildnumber-maven-plugin - 3.0.0 + 3.2.0 org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.4.0 org.glassfish.copyright @@ -123,7 +123,7 @@ org.apache.felix maven-bundle-plugin - 5.1.8 + 5.1.9 <_noextraheaders>true @@ -138,7 +138,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.0 org.apache.maven.plugins @@ -148,7 +148,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 + 3.4.0 com.github.spotbugs @@ -336,7 +336,7 @@ osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.processor) (version>=1.0.0)(!(version>=2.0.0)))";resolution:=optional, osgi.serviceloader; - filter:="(osgi.serviceloader=jakarta.json.spi.JsonProvider"; + filter:="(osgi.serviceloader=jakarta.json.spi.JsonProvider)"; osgi.serviceloader="jakarta.json.spi.JsonProvider"; cardinality:=multiple;resolution:=optional ]]> From 357e30ae7523782d0a6c7718d70994af87fce92b Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Fri, 20 Oct 2023 14:12:00 +0200 Subject: [PATCH 19/24] Update gh action build Signed-off-by: Lukas Jungmann --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 29b87491..5922b5a8 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: - java_version: [ 11, 17, 21-ea ] + java_version: [ 11, 17, 21 ] steps: - name: Checkout for build From b7f9d851b854686ccbc1495ad8c71615265f6b71 Mon Sep 17 00:00:00 2001 From: Eclipse JSON-P Bot Date: Fri, 20 Oct 2023 12:30:15 +0000 Subject: [PATCH 20/24] Update API version of jakarta.json:jsonp to 2.1.3 --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index 0781dd53..0f4906a6 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -30,7 +30,7 @@ jakarta.json jakarta.json-api - 2.1.3-SNAPSHOT + 2.1.3 Jakarta JSON Processing API Jakarta JSON Processing defines a Java(R) based framework for parsing, generating, transforming, and querying JSON documents. https://github.com/eclipse-ee4j/jsonp From 6e2cd612b228b7bc2317a074c1357e030e50716d Mon Sep 17 00:00:00 2001 From: Eclipse JSON-P Bot Date: Fri, 20 Oct 2023 12:32:51 +0000 Subject: [PATCH 21/24] Update API version of jakarta.json:jsonp to 2.1.4-SNAPSHOT --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index 0f4906a6..2f76e074 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -30,7 +30,7 @@ jakarta.json jakarta.json-api - 2.1.3 + 2.1.4-SNAPSHOT Jakarta JSON Processing API Jakarta JSON Processing defines a Java(R) based framework for parsing, generating, transforming, and querying JSON documents. https://github.com/eclipse-ee4j/jsonp From 05d3a9a0860734074e8c5b21b1ee33d19e82c8ef Mon Sep 17 00:00:00 2001 From: Gurunandan Rao Date: Mon, 18 Dec 2023 16:14:33 +0530 Subject: [PATCH 22/24] use classpath for jakarta api libraries. Signed-off-by: Gurunandan Rao --- tck/tck-dist-eftl/src/main/bin/pom.xml | 23 ++++--------------- .../main/bin/tck-tests-pluggability/pom.xml | 12 +++------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/tck/tck-dist-eftl/src/main/bin/pom.xml b/tck/tck-dist-eftl/src/main/bin/pom.xml index 09be95a5..7cf50b2b 100644 --- a/tck/tck-dist-eftl/src/main/bin/pom.xml +++ b/tck/tck-dist-eftl/src/main/bin/pom.xml @@ -16,47 +16,36 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - - + 4.0.0 - org.eclipse.ee4j project 1.0.7 - jakarta.json jakarta.json-tck-impl ${project.version} pom - jakarta.json jakarta.json-api 2.1.0 - org.eclipse.parsson parsson 1.1.0 - ${project.version} - UTF-8 \${project.build.directory}/jdk-bundle - 2.1.0 true - @@ -68,12 +57,10 @@ - tck-tests tck-tests-pluggability - \${jsonp-api.groupId} @@ -92,7 +79,6 @@ test - verify @@ -120,14 +106,14 @@ maven-surefire-plugin 3.0.0-M5 + false false \${impl.alltests} 1 false \${jimage.dir} - - \${project.build.directory}/signaturedirectory/jakarta.json-api.jar:\${jimage.dir}/java.base:\${jimage.dir}/java.rmi:\${jimage.dir}/java.sql:\${jimage.dir}/java.naming + \${project.build.directory}/signaturedirectory/jakarta.json-api.jar:\${jimage.dir}/java.base:\${jimage.dir}/java.rmi:\${jimage.dir}/java.sql:\${jimage.dir}/java.naming @@ -135,7 +121,6 @@ - single-test @@ -149,4 +134,4 @@ - + \ No newline at end of file diff --git a/tck/tck-dist-eftl/src/main/bin/tck-tests-pluggability/pom.xml b/tck/tck-dist-eftl/src/main/bin/tck-tests-pluggability/pom.xml index 61f8934e..80a0d74c 100644 --- a/tck/tck-dist-eftl/src/main/bin/tck-tests-pluggability/pom.xml +++ b/tck/tck-dist-eftl/src/main/bin/tck-tests-pluggability/pom.xml @@ -16,21 +16,15 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - - + 4.0.0 - jakarta.json jakarta.json-tck-impl ${project.version} ../pom.xml - tck-tests-pluggability - jakarta.json @@ -38,7 +32,6 @@ test - @@ -48,8 +41,9 @@ jakarta.json:jakarta.json-tck-tests-pluggability + false - + \ No newline at end of file From 29c792a4c775d5152d52fd0729d36d160dd64174 Mon Sep 17 00:00:00 2001 From: Gregor Gottschewski <85785843+Gregor-Gottschewski@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:10:51 +0100 Subject: [PATCH 23/24] Fix typo in Java Doc --- api/src/main/java/jakarta/json/Json.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/jakarta/json/Json.java b/api/src/main/java/jakarta/json/Json.java index 373ab4c5..3f47967f 100644 --- a/api/src/main/java/jakarta/json/Json.java +++ b/api/src/main/java/jakarta/json/Json.java @@ -255,7 +255,7 @@ public static JsonArrayBuilder createArrayBuilder(JsonArray array) { /** * Creates a JSON array builder, initialized with the content of specified {@code collection}. - * If the @{code collection} contains {@link Optional}s then resulting JSON array builder + * If the {@code collection} contains {@link Optional}s then resulting JSON array builder * contains the value from the {@code collection} only if the {@link Optional} is not empty. * * @param collection the initial data for the builder From 21733cff9ddf08338710d87d23739c9c3276553f Mon Sep 17 00:00:00 2001 From: Gregor Gottschewski <85785843+Gregor-Gottschewski@users.noreply.github.com> Date: Sun, 11 Feb 2024 12:43:31 +0100 Subject: [PATCH 24/24] Update copyright year in header --- api/src/main/java/jakarta/json/Json.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/jakarta/json/Json.java b/api/src/main/java/jakarta/json/Json.java index 3f47967f..736f7aa2 100644 --- a/api/src/main/java/jakarta/json/Json.java +++ b/api/src/main/java/jakarta/json/Json.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at