Skip to content

Commit

Permalink
Run CI on JDK 21 (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
tokuhirom committed Dec 1, 2023
1 parent c5c2a80 commit 08900e2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '17' ] # We want to test on LTSs.
java: # We want to test on LTSs.
- '17'
- '21'
steps:
- name: actions/setup-java@v3 (JDK ${{ matrix.java }})
uses: actions/setup-java@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.mockito.Mockito.when;

import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.util.Map;

Expand Down Expand Up @@ -71,7 +72,7 @@ void constructorNoException() {
@Test
void getRequestUrl() throws Exception {
AbstractLineClientException exception = new AbstractLineClientException(response, "test message");
assertThat(exception.getRequestUrl()).isEqualTo(new URL("https://example.com/"));
assertThat(exception.getRequestUrl()).isEqualTo(new URI("https://example.com/").toURL());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import java.util.Collection;
import java.util.List;

import jakarta.annotation.PostConstruct;

import org.slf4j.Logger;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
Expand Down Expand Up @@ -69,7 +71,10 @@ public LineMessageHandlerSupport(
final ConfigurableApplicationContext applicationContext) {
this.returnValueConsumerFactory = returnValueConsumerFactory;
this.applicationContext = applicationContext;
}

@PostConstruct
public void initialize() {
applicationContext.addApplicationListener(event -> {
if (event instanceof ContextRefreshedEvent) {
refresh();
Expand Down

0 comments on commit 08900e2

Please sign in to comment.