From 2df29bb82020fd96abe7393139f636599f206dd7 Mon Sep 17 00:00:00 2001
From: Scott Leberknight <174812+sleberknight@users.noreply.github.com>
Date: Mon, 7 Aug 2023 16:27:02 -0400
Subject: [PATCH] Update parent POM and BOM for JDK 17 and major library
updates
* Bump version to 2.0.0-SNAPSHOT
* Bump kiwi-parent from 2.0.20 to 3.0.1
* Bump kiwi-bom from 1.1.1 to 2.0.0
* Update build for JDK 17 and 20
* Update CodeQL workflow to use JDK 17
* Bump versions of kiwi libraries
* Fix Dropwizard package changes
* Refactor from javax to jakarta namespace for Jakarta EE 9
* Misc grammar fixes in ExternalConfigProvider
* Simplify "enabled" logic in ElucidationConfigProvider by just
using Boolean.TRUE.equals(...)
---
.github/workflows/build.yml | 12 ++++++------
.github/workflows/codeql.yml | 6 ++++++
pom.xml | 10 +++++-----
.../config/provider/ElucidationConfigProvider.java | 2 +-
.../config/provider/ExternalConfigProvider.java | 4 ++--
5 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7394a92..82e2820 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- java_version: [ '11', '17', '20' ]
+ java_version: [ '17', '20' ]
steps:
# Check out the project
- uses: actions/checkout@v3
@@ -33,7 +33,7 @@ jobs:
# Cache all the things
- name: Cache SonarCloud packages
uses: actions/cache@v3
- if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
+ if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
@@ -54,16 +54,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
run: mvn -B -V compile
- # Run tests when Java version > 11 (Sonar runs tests and analysis on JDK 11)
+ # Run tests when Java version > 17 (Sonar runs tests and analysis on JDK 17)
- name: Run tests
- if: ${{ matrix.java_version != '11' }}
+ if: ${{ matrix.java_version != '17' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
run: mvn -B -V verify
- # Run Sonar Analysis (on Java version 11 only)
+ # Run Sonar Analysis (on Java version 17 only)
- name: Analyze with SonarCloud
- if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
+ if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 8f3e02a..8910e75 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -33,6 +33,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
+ - name: Set up Java 17
+ uses: actions/setup-java@v3
+ with:
+ distribution: temurin
+ java-version: 17
+
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
diff --git a/pom.xml b/pom.xml
index 3db0e70..dde4721 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,11 +6,11 @@
org.kiwiproject
kiwi-parent
- 2.0.20
+ 3.0.1
dropwizard-config-providers
- 1.1.14-SNAPSHOT
+ 2.0.0-SNAPSHOT
jar
${project.groupId}:${project.artifactId}
@@ -30,11 +30,11 @@
- 2.7.0
- 1.1.1
+ 3.0.0
+ 2.0.0
- 2.4.0
+ 3.0.0
kiwiproject_dropwizard-config-providers
diff --git a/src/main/java/org/kiwiproject/config/provider/ElucidationConfigProvider.java b/src/main/java/org/kiwiproject/config/provider/ElucidationConfigProvider.java
index 3f4db22..b443713 100644
--- a/src/main/java/org/kiwiproject/config/provider/ElucidationConfigProvider.java
+++ b/src/main/java/org/kiwiproject/config/provider/ElucidationConfigProvider.java
@@ -114,7 +114,7 @@ private ElucidationConfigProvider(ExternalConfigProvider externalConfigProvider,
var enabledValue = enabledResolution.getValue();
- this.enabled = !isNull(enabledValue) && enabledValue;
+ this.enabled = Boolean.TRUE.equals(enabledValue);
this.enabledResolvedBy = enabledResolution.getResolvedBy();
}
diff --git a/src/main/java/org/kiwiproject/config/provider/ExternalConfigProvider.java b/src/main/java/org/kiwiproject/config/provider/ExternalConfigProvider.java
index 43a5b7b..5e6b2fa 100644
--- a/src/main/java/org/kiwiproject/config/provider/ExternalConfigProvider.java
+++ b/src/main/java/org/kiwiproject/config/provider/ExternalConfigProvider.java
@@ -154,8 +154,8 @@ public ResolverResult resolveExternalProperty(String propertyKey,
}
/**
- * Will check if a given {@link ExternalConfigProvider} is null and return a new one if so. Otherwise return the one
- * passed in.
+ * Will check if the given {@link ExternalConfigProvider} is null and return a new one if so. Otherwise, return the
+ * one passed in.
*
* @param provided an {@link ExternalConfigProvider} to test for null
* @return A new {@link ExternalConfigProvider} if the given {@code provided} is null or {@code provided}