File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spar-wings-json-patch/src/main/java/jp/xet/sparwings/jackson/patch Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ class JsonPatches<T> implements UpdateRequest<T> {
3838 @ SuppressWarnings ("unchecked" )
3939 public T apply (T original ) throws IllegalPatchException {
4040 try {
41- JsonPatch patch = JsonPatch .fromJson (this . node );
41+ JsonPatch patch = JsonPatch .fromJson (node );
4242 JsonNode originalNode = mapper .valueToTree (original );
4343 JsonNode patchedNode = patch .apply (originalNode );
4444 T patched = mapper .treeToValue (patchedNode , (Class <T >) original .getClass ());
4545 return patched ; // NOPMD
46- } catch (IllegalArgumentException | JsonPatchException | IOException e ) {
46+ } catch (IllegalArgumentException | JsonPatchException | IOException | NullPointerException e ) { // NOPMD
4747 throw new IllegalPatchException (e );
4848 }
4949 }
You can’t perform that action at this time.
0 commit comments