Skip to content

Commit c4cae06

Browse files
authored
Address issues #260 and #261: Upgrade java-cfenv to use json-io 4.24.0 and Spring Boot 3.2.5 (#263)
* Upgrade logic in JsonIoConverter.jsonToJavaWithListsAndInts method to be compatible with json-io 4.20.0 API * Update to latest version of json-io * Upgrade versions of Spring Boot and json-io to latest stable
1 parent 713fe11 commit c4cae06

File tree

10 files changed

+19
-17
lines changed

10 files changed

+19
-17
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
java: [ '17' ]
1515
name: Java ${{ matrix.Java }} build
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Set up JDK
19-
uses: actions/setup-java@v3
19+
uses: actions/setup-java@v4
2020
with:
2121
java-version: ${{ matrix.java }}
2222
distribution: adopt
2323
- name: Cache Gradle packages
24-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2525
with:
2626
path: |
2727
~/.gradle/caches
@@ -30,7 +30,7 @@ jobs:
3030
restore-keys: |
3131
${{ runner.os }}-gradle-
3232
- name: Validate Gradle wrapper
33-
uses: gradle/wrapper-validation-action@v1
33+
uses: gradle/wrapper-validation-action@v2
3434
- name: Build with Gradle
3535
run: ./gradlew build
3636
- name: Cleanup Gradle Cache

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ rebel.xml
3939

4040
# VSCode artifacts
4141
.vscode/
42+
.history/

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
ext {
33
jmockitVersion = "1.49"
4-
springBootVersion = "3.1.5"
4+
springBootVersion = "3.2.5"
55
}
66
}
77

@@ -13,5 +13,5 @@ plugins {
1313
description = 'Java Library for Accessing Cloud Foundry Environment Variables'
1414

1515
wrapper {
16-
gradleVersion = "8.3"
16+
gradleVersion = "8.7"
1717
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
org.gradle.parallel=true
22

33
group=io.pivotal.cfenv
4-
version=3.1.5-SNAPSHOT
4+
version=3.1.6-SNAPSHOT
55
onlyShowStandardStreamsOnTestFailure=false
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

java-cfenv-all/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ shadowJar {
3636
exclude(dependency('org.springframework.boot::'))
3737
exclude(dependency('org.springframework::'))
3838
}
39-
relocate 'com.cedarsoftware.util.io', 'io.pivotal.cfenv.shaded.com.cedarsoftware.util.io'
39+
relocate 'com.cedarsoftware.io', 'io.pivotal.cfenv.shaded.com.cedarsoftware.io'
4040
}
4141

4242
publishing {

java-cfenv-docs/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ configurations {
1010
}
1111

1212
dependencies {
13-
docs "io.spring.docresources:spring-doc-resources:0.2.1.RELEASE@zip"
13+
docs "io.spring.docresources:spring-doc-resources:0.2.5@zip"
1414
}
1515

1616
task prepareAsciidocBuild(type: Sync) {

java-cfenv/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
description = 'Java CF Env Core Library'
77

88
dependencies {
9-
api 'com.cedarsoftware:json-io:4.19.1'
9+
api 'com.cedarsoftware:json-io:4.24.0'
1010

1111
testImplementation "org.springframework.boot:spring-boot-starter-test"
1212
testImplementation "junit:junit"

java-cfenv/src/main/java/io/pivotal/cfenv/core/JsonIoConverter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
import java.util.List;
2222
import java.util.Map;
2323

24-
import com.cedarsoftware.util.io.JsonObject;
25-
import com.cedarsoftware.util.io.JsonReader;
24+
import com.cedarsoftware.io.JsonIo;
25+
import com.cedarsoftware.io.JsonObject;
26+
2627

2728
public class JsonIoConverter {
2829

@@ -35,8 +36,8 @@ public class JsonIoConverter {
3536
*/
3637
public static Map jsonToJavaWithListsAndInts(String jsonInput) {
3738
Map args = new HashMap();
38-
args.put(JsonReader.USE_MAPS, true);
39-
JsonObject rawServicesMap = (JsonObject) JsonReader.jsonToJava(jsonInput, args);
39+
args.put(JsonIo.USE_MAPS, true);
40+
JsonObject rawServicesMap = JsonIo.toObjects(jsonInput, JsonIo.getReadOptionsBuilder(args).build(), JsonObject.class);
4041
return convertArraysAndLongs(rawServicesMap);
4142
}
4243

settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
pluginManagement {
22
plugins {
33
id "io.spring.nohttp" version "0.0.11"
4-
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
5-
id 'org.asciidoctor.jvm.convert' version '3.3.2'
4+
id 'org.asciidoctor.jvm.pdf' version '4.0.2'
5+
id 'org.asciidoctor.jvm.convert' version '4.0.2'
66
}
77
}
88

0 commit comments

Comments
 (0)