Skip to content

Commit

Permalink
Added JDK 21 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakky54 committed Mar 13, 2024
1 parent d1c4ad6 commit 59a45c3
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
java: [ '11', '17' ]
java: [ '11', '17,' '21' ]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
os: [ windows-latest ]
java: [ '11', '17' ]
java: [ '11', '17', '21' ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
<artifactId>logcaptor</artifactId>
</dependency>
<dependency>
<groupId>com.nhaarman.mockitokotlin2</groupId>
<groupId>org.mockito.kotlin</groupId>
<artifactId>mockito-kotlin</artifactId>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package nl.altindag.client.service

import com.github.kittinunf.fuel.core.*
import com.github.kittinunf.fuel.core.requests.DefaultBody
import com.nhaarman.mockitokotlin2.*
import nl.altindag.client.TestConstants.HEADER_KEY_CLIENT_TYPE
import nl.altindag.client.TestConstants.HTTP_URL
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.*

import java.net.URL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.HTTP4K_APACHE4_ASYNC_HTTP_CLIENT
import nl.altindag.client.TestConstants
import nl.altindag.client.util.MockServerTestHelper
Expand All @@ -25,6 +23,8 @@ import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy
import org.awaitility.core.ConditionTimeoutException
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify
import java.util.concurrent.TimeUnit

class Http4kApache4AsyncHttpClientServiceShould {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.HTTP4K_APACHE4_HTTP_CLIENT
import nl.altindag.client.TestConstants
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class Http4kApache4HttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.HTTP4K_APACHE5_ASYNC_HTTP_CLIENT
import nl.altindag.client.TestConstants
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class Http4kApache5AsyncHttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.HTTP4K_APACHE5_HTTP_CLIENT
import nl.altindag.client.TestConstants
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class Http4kApache5HttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.HTTP4K_JAVA_HTTP_CLIENT
import nl.altindag.client.TestConstants
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class Http4kJavaHttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.HTTP4K_JETTY_HTTP_CLIENT
import nl.altindag.client.TestConstants
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class Http4kJettyHttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.HTTP4K_OK_HTTP_CLIENT
import nl.altindag.client.TestConstants
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class Http4kOkHttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.*
import nl.altindag.client.TestConstants.HEADER_KEY_CLIENT_TYPE
import nl.altindag.client.TestConstants.HTTP_URL
import nl.altindag.client.util.SSLFactoryTestHelper
Expand All @@ -25,6 +24,7 @@ import okhttp3.Response
import okhttp3.ResponseBody
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.*

class KohttpServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.KTOR_ANDROID_HTTP_CLIENT
import nl.altindag.client.TestConstants.HTTPS_URL
import nl.altindag.client.TestConstants.HTTP_URL
Expand All @@ -25,6 +23,8 @@ import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class KtorAndroidHttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.KTOR_APACHE_HTTP_CLIENT
import nl.altindag.client.TestConstants.HTTP_URL
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test

import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class KtorApacheHttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.KTOR_JAVA_HTTP_CLIENT
import nl.altindag.client.TestConstants.HTTP_URL
import nl.altindag.client.TestConstants.HTTPS_URL
Expand All @@ -25,7 +23,8 @@ import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.jupiter.api.Test

import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class KtorJavaHttpClientServiceShould {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package nl.altindag.client.service

import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import nl.altindag.client.ClientType.KTOR_OK_HTTP
import nl.altindag.client.TestConstants.HTTP_URL
import nl.altindag.client.util.MockServerTestHelper
import nl.altindag.client.util.SSLFactoryTestHelper
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.kotlin.times
import org.mockito.kotlin.verify

class KtorOkHttpClientServiceShould {

Expand Down
24 changes: 15 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<properties>
<version.java>11</version.java>
<version.scala>2.13</version.scala>
<version.scala-compiler>2.13.9</version.scala-compiler>
<version.kotlin>1.6.10</version.kotlin>
<version.scala-compiler>2.13.13</version.scala-compiler>
<version.kotlin>1.9.22</version.kotlin>
<version.kotlinx-coroutines-core>1.6.0-native-mt</version.kotlinx-coroutines-core>
<version.sslcontext-kickstart>8.1.1</version.sslcontext-kickstart>
<version.spring>2.7.18</version.spring>
Expand Down Expand Up @@ -69,18 +69,18 @@
<version.jackson-module-scala>2.13.1</version.jackson-module-scala>
<version.jacoco-maven-plugin>0.8.7</version.jacoco-maven-plugin>
<version.junit-jupiter>5.8.2</version.junit-jupiter>
<version.mockito>4.2.0</version.mockito>
<version.mockito>4.8.1</version.mockito>
<version.assertj-core>3.22.0</version.assertj-core>
<version.logcaptor>2.7.8</version.logcaptor>
<version.byte-buddy>1.12.7</version.byte-buddy>
<version.mockito-kotlin>2.2.0</version.mockito-kotlin>
<version.byte-buddy>1.14.12</version.byte-buddy>
<version.mockito-kotlin>5.2.1</version.mockito-kotlin>
<version.scalatest>3.2.10</version.scalatest>
<version.scalatest-maven-plugin>2.0.2</version.scalatest-maven-plugin>
<version.mockito-scala>1.17.0</version.mockito-scala>
<version.mockito-scala>1.17.30</version.mockito-scala>
<version.mockserver>5.11.2</version.mockserver>
<version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
<version.maven-shade-plugin>3.2.4</version.maven-shade-plugin>
<version.scala-maven-plugin>4.7.2</version.scala-maven-plugin>
<version.scala-maven-plugin>4.8.1</version.scala-maven-plugin>
<version.license-maven-plugin>4.2.rc3</version.license-maven-plugin>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<license.git.copyrightYears>2018</license.git.copyrightYears>
Expand Down Expand Up @@ -498,6 +498,12 @@
<version>${version.mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${version.mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down Expand Up @@ -536,7 +542,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.nhaarman.mockitokotlin2</groupId>
<groupId>org.mockito.kotlin</groupId>
<artifactId>mockito-kotlin</artifactId>
<version>${version.mockito-kotlin}</version>
<scope>test</scope>
Expand Down Expand Up @@ -643,7 +649,7 @@ limitations under the License.
<artifactId>kotlin-maven-plugin</artifactId>
<version>${version.kotlin}</version>
<configuration>
<jvmTarget>1.8</jvmTarget>
<jvmTarget>11</jvmTarget>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit 59a45c3

Please sign in to comment.