Skip to content

Commit

Permalink
Builds with JDK 17
Browse files Browse the repository at this point in the history
  • Loading branch information
damianszczepanik committed Jan 1, 2024
1 parent b4d5ba7 commit 7468e17
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt

- run: mvn --batch-mode verify
2 changes: 1 addition & 1 deletion .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt

- name: Generate demo report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt

- name: Generate code coverage
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- jdk17
# do not validate pull requests because SONAR_TOKEN is available only for project owner

jobs:
Expand All @@ -17,7 +18,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt

- name: Build with Maven
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<!-- Allow JUnit to access the test classes -->
<argLine>
--add-opens java.base/java.lang=ALL-UNNAMED
</argLine>
<systemPropertyVariables>
<!-- JaCoCo runtime must know where to dump coverage: -->
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
* @author Damian Szczepanik (damianszczepanik@github)
*/
public abstract class AbstractJacksonVisitor extends AbstractVisitor {

@SuppressWarnings("unchecked")

/**
* Process map or array/list objects.
*
* @param key key
* @param value value that should be converted
*/
protected void processComplex(String key, Object value) {
if (isMap(value)) {
processMap((Map<String, Object>) value);
Expand All @@ -26,6 +31,11 @@ protected void processComplex(String key, Object value) {
}
}

/**
* Process map object.
*
* @param map value that should be converted
*/
protected void processMap(Map<String, Object> map) {
for (Map.Entry<String, Object> keyMap : map.entrySet()) {
String key = keyMap.getKey();
Expand All @@ -39,6 +49,11 @@ protected void processMap(Map<String, Object> map) {
}
}

/**
* Process array/list object.
*
* @param list value that should be converted
*/
private void processArray(String key, List<Object> list) {
for (int i = 0; i < list.size(); i++) {
Object value = list.get(i);
Expand Down

0 comments on commit 7468e17

Please sign in to comment.