make the build jdk18 friendly (no comp warnings)

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/api/src/main/java/jakarta/json/EmptyArray.java b/api/src/main/java/jakarta/json/EmptyArray.java
index fcc3f5a..1d627c3 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 @@
     /** 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 f8c4aa8..5210318 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 @@
     /** for serialization */
     private static final long serialVersionUID = -1461653546889072583L;
 
+    /** Default constructor. */
+    EmptyObject() {}
+
     @Override
     public Set<Entry<String, JsonValue>> entrySet() {
         return Collections.<Entry<String, JsonValue>>emptySet();
diff --git a/api/src/main/java/jakarta/json/stream/JsonParsingException.java b/api/src/main/java/jakarta/json/stream/JsonParsingException.java
index 06c52c6..c657083 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 @@
     /**
      * 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.