Skip to content

Commit 0c9ccd8

Browse files
committed
remove usage of deprecated method, add missing comment
Signed-off-by: Lukas Jungmann <[email protected]>
1 parent 3141627 commit 0c9ccd8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

api/src/main/java/jakarta/json/spi/JsonProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public abstract class JsonProvider {
5050
private static final String DEFAULT_PROVIDER
5151
= "org.eclipse.jsonp.JsonProviderImpl";
5252

53+
/**
54+
* Default constructor.
55+
*/
5356
protected JsonProvider() {
5457
}
5558

@@ -70,7 +73,7 @@ public static JsonProvider provider() {
7073
}
7174
try {
7275
Class<?> clazz = Class.forName(DEFAULT_PROVIDER);
73-
return (JsonProvider) clazz.newInstance();
76+
return (JsonProvider) clazz.getConstructor().newInstance();
7477
} catch (ClassNotFoundException x) {
7578
throw new JsonException(
7679
"Provider " + DEFAULT_PROVIDER + " not found", x);

api/src/main/java/jakarta/json/stream/JsonParsingException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
*/
2525
public class JsonParsingException extends JsonException {
2626

27+
/**
28+
* The location of the incorrect JSON.
29+
*/
2730
private final JsonLocation location;
2831

2932
/**

0 commit comments

Comments
 (0)