Skip to content

Commit b172d8f

Browse files
committed
Merge branch 'release/0.32'
2 parents d57cb07 + ac5b666 commit b172d8f

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.31
1+
0.32

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ description "Support library for Spring framework, AWS Java SDK and the others."
3838
subprojects {
3939
apply plugin: "java"
4040
apply plugin: "maven"
41+
apply plugin: "maven-publish"
42+
apply plugin: "com.jfrog.bintray"
4143

4244
sourceCompatibility = targetCompatibility = 1.8
4345

@@ -91,7 +93,6 @@ subprojects {
9193

9294

9395
// ======== Publishing =======
94-
apply plugin: 'maven-publish'
9596
publishing {
9697
publications {
9798
mavenJava(MavenPublication) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# artifact version
2-
currentVersion = 0.31
2+
currentVersion = 0.32
33

44
# dependency versions
55
springBootVersion = 1.3.3.RELEASE

spar-wings-json-patch/src/main/java/jp/xet/sparwings/jackson/patch/JsonPatches.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class JsonPatches<T> implements UpdateRequest<T> {
3131

3232
private final ObjectMapper mapper;
3333

34+
/** JSON Patch document node */
3435
private final JsonNode node;
3536

3637

@@ -39,7 +40,8 @@ class JsonPatches<T> implements UpdateRequest<T> {
3940
public T apply(T original) throws IllegalPatchException {
4041
try {
4142
JsonPatch patch = JsonPatch.fromJson(node);
42-
JsonNode originalNode = mapper.valueToTree(original);
43+
String json = mapper.writeValueAsString(original);
44+
JsonNode originalNode = mapper.readTree(json);
4345
JsonNode patchedNode = patch.apply(originalNode);
4446
T patched = mapper.treeToValue(patchedNode, (Class<T>) original.getClass());
4547
return patched; // NOPMD

0 commit comments

Comments
 (0)