Skip to content

Commit

Permalink
remove usage of deprecated method, add missing comment
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Oct 1, 2021
1 parent 3141627 commit 0c9ccd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/main/java/jakarta/json/spi/JsonProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public abstract class JsonProvider {
private static final String DEFAULT_PROVIDER
= "org.eclipse.jsonp.JsonProviderImpl";

/**
* Default constructor.
*/
protected JsonProvider() {
}

Expand All @@ -70,7 +73,7 @@ public static JsonProvider provider() {
}
try {
Class<?> clazz = Class.forName(DEFAULT_PROVIDER);
return (JsonProvider) clazz.newInstance();
return (JsonProvider) clazz.getConstructor().newInstance();
} catch (ClassNotFoundException x) {
throw new JsonException(
"Provider " + DEFAULT_PROVIDER + " not found", x);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*/
public class JsonParsingException extends JsonException {

/**
* The location of the incorrect JSON.
*/
private final JsonLocation location;

/**
Expand Down

0 comments on commit 0c9ccd8

Please sign in to comment.