Skip to content

Commit 3f390b0

Browse files
1.0.2: Spring Boot 2.7.1 Update + JsonPatch update
1 parent aa0e992 commit 3f390b0

File tree

12 files changed

+29
-29
lines changed

12 files changed

+29
-29
lines changed

lemon-demo-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<groupId>com.naturalprogrammer</groupId>
1616
<artifactId>spring-lemon</artifactId>
17-
<version>1.0.1</version>
17+
<version>1.0.2</version>
1818
</parent>
1919

2020
<dependencies>

lemon-demo-reactive/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<parent>
1414
<groupId>com.naturalprogrammer</groupId>
1515
<artifactId>spring-lemon</artifactId>
16-
<version>1.0.1</version>
16+
<version>1.0.2</version>
1717
</parent>
1818

1919
<dependencies>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.naturalprogrammer</groupId>
88
<artifactId>spring-lemon</artifactId>
9-
<version>1.0.1</version>
9+
<version>1.0.2</version>
1010
<packaging>pom</packaging>
1111

1212
<name>${project.groupId}:${project.artifactId}</name>
@@ -40,7 +40,7 @@
4040
<parent>
4141
<groupId>org.springframework.boot</groupId>
4242
<artifactId>spring-boot-starter-parent</artifactId>
43-
<version>2.6.0</version>
43+
<version>2.7.1</version>
4444
<relativePath /> <!-- lookup parent from repository -->
4545
</parent>
4646

spring-lemon-commons-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>com.naturalprogrammer</groupId>
4040
<artifactId>spring-lemon</artifactId>
41-
<version>1.0.1</version>
41+
<version>1.0.2</version>
4242
</parent>
4343

4444
<dependencies>

spring-lemon-commons-mongo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>com.naturalprogrammer</groupId>
4040
<artifactId>spring-lemon</artifactId>
41-
<version>1.0.1</version>
41+
<version>1.0.2</version>
4242
</parent>
4343

4444
<dependencies>

spring-lemon-commons-reactive/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>com.naturalprogrammer</groupId>
4040
<artifactId>spring-lemon</artifactId>
41-
<version>1.0.1</version>
41+
<version>1.0.2</version>
4242
</parent>
4343

4444
<dependencies>

spring-lemon-commons-web/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>com.naturalprogrammer</groupId>
4040
<artifactId>spring-lemon</artifactId>
41-
<version>1.0.1</version>
41+
<version>1.0.2</version>
4242
</parent>
4343

4444
<dependencies>

spring-lemon-commons/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<parent>
4040
<groupId>com.naturalprogrammer</groupId>
4141
<artifactId>spring-lemon</artifactId>
42-
<version>1.0.1</version>
42+
<version>1.0.2</version>
4343
</parent>
4444

4545
<dependencies>
@@ -76,9 +76,9 @@
7676
</dependency>
7777

7878
<dependency>
79-
<groupId>com.github.fge</groupId>
79+
<groupId>com.github.java-json-tools</groupId>
8080
<artifactId>json-patch</artifactId>
81-
<version>1.9</version>
81+
<version>1.13</version>
8282
</dependency>
8383

8484
<!-- For generating Auto Completion of lemon.* in application.properties

spring-lemon-commons/src/main/java/com/naturalprogrammer/spring/lemon/commons/util/LecUtils.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static <K,V> Map<K,V> mapOf(Object... keyValPair) {
121121
if(keyValPair.length % 2 != 0)
122122
throw new IllegalArgumentException("Keys and values must be in pairs");
123123

124-
Map<K,V> map = new HashMap<K,V>(keyValPair.length / 2);
124+
Map<K, V> map = new HashMap<>(keyValPair.length / 2);
125125

126126
for(int i = 0; i < keyValPair.length; i += 2){
127127
map.put((K) keyValPair[i], (V) keyValPair[i+1]);
@@ -140,29 +140,29 @@ public static void ensureCredentials(boolean valid, String messageKey) {
140140
throw new BadCredentialsException(LexUtils.getMessage(messageKey));
141141
}
142142

143-
143+
144144
/**
145145
* Applies a JsonPatch to an object
146146
*/
147-
@SuppressWarnings("unchecked")
147+
@SuppressWarnings("unchecked")
148148
public static <T> T applyPatch(T originalObj, String patchString)
149-
throws JsonProcessingException, IOException, JsonPatchException {
149+
throws IOException, JsonPatchException {
150150

151-
// Parse the patch to JsonNode
152-
JsonNode patchNode = objectMapper.readTree(patchString);
151+
// Parse the patch to JsonNode
152+
JsonNode patchNode = objectMapper.readTree(patchString);
153153

154-
// Create the patch
155-
JsonPatch patch = JsonPatch.fromJson(patchNode);
154+
// Create the patch
155+
JsonPatch patch = JsonPatch.fromJson(patchNode);
156156

157-
// Convert the original object to JsonNode
158-
JsonNode originalObjNode = objectMapper.valueToTree(originalObj);
157+
// Convert the original object to JsonNode
158+
JsonNode originalObjNode = objectMapper.valueToTree(originalObj);
159159

160-
// Apply the patch
161-
TreeNode patchedObjNode = patch.apply(originalObjNode);
160+
// Apply the patch
161+
TreeNode patchedObjNode = patch.apply(originalObjNode);
162162

163-
// Convert the patched node to an updated obj
164-
return objectMapper.treeToValue(patchedObjNode, (Class<T>) originalObj.getClass());
165-
}
163+
// Convert the patched node to an updated obj
164+
return objectMapper.treeToValue(patchedObjNode, (Class<T>) originalObj.getClass());
165+
}
166166

167167

168168
/**

spring-lemon-exceptions/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<parent>
4040
<groupId>com.naturalprogrammer</groupId>
4141
<artifactId>spring-lemon</artifactId>
42-
<version>1.0.1</version>
42+
<version>1.0.2</version>
4343
</parent>
4444

4545
<dependencies>

0 commit comments

Comments
 (0)