Skip to content

Commit

Permalink
Update minimum JDK version to 11 & add support to JDK 21 (#160)
Browse files Browse the repository at this point in the history
* Update maven.yml - add JDK 21
* Update pom.xml
* Upgrade JUnit and Mockito
* Remove remaining JUnit 4 tests. upgrade compiler target version
* Drop Java 8
* Update stylesheet.css
  • Loading branch information
oswaldobapvicjr authored Mar 2, 2024
1 parent a6a04db commit bbf2a03
Show file tree
Hide file tree
Showing 18 changed files with 746 additions and 477 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java_version: [ 8, 11, 17 ]
java_version: [ 11, 17, 21 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'adopt'
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package --file pom.xml --no-transfer-progress
- name: Upload to Codecov
uses: codecov/codecov-action@v1.5.2
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion confectory-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<jsonmerge.version>1.2.1</jsonmerge.version>
<json-path.version>2.9.0</json-path.version>
<json-smart.version>2.5.0</json-smart.version>
<performetrics.version>2.4.0</performetrics.version>
<performetrics.version>2.5.0</performetrics.version>
<objenesis.version>3.3</objenesis.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.stream.Stream;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;

import net.obvj.confectory.settings.ConfectorySettings;

Expand Down Expand Up @@ -359,7 +358,7 @@ private Stream<Configuration<?>> getConfigurationStream(String namespace)
*/
private String parseNamespace(String namespace)
{
return StringUtils.defaultString(namespace, DEFAULT_NAMESPACE);
return Objects.toString(namespace, DEFAULT_NAMESPACE);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

package net.obvj.confectory;

import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.stream.Stream;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -147,6 +144,6 @@ abstract Stream<Configuration<?>> getConfigurationStream(String namespace,
*/
private static String parseNamespace(String namespace)
{
return StringUtils.defaultString(namespace, ConfigurationContainer.DEFAULT_NAMESPACE);
return Objects.toString(namespace, ConfigurationContainer.DEFAULT_NAMESPACE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public <T> T newObject(Class<T> type) throws ReflectiveOperationException
FAST
{
@Override
@SuppressWarnings("restriction")
public <T> T newObject(Class<T> type) throws ReflectiveOperationException
{
return type.cast(UnsafeAccessor.UNSAFE.allocateInstance(type));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
* @author oswaldo.bapvic.jr
* @since 2.5.0
*/
@SuppressWarnings("restriction")
public final class UnsafeAccessor
{
/**
Expand Down
Loading

0 comments on commit bbf2a03

Please sign in to comment.