Skip to content

Commit 18f140a

Browse files
authored
Merge pull request #359 from Naenyn/fix-java-21-issues
First pass at fixing java 21 issues.
2 parents e6b7e73 + 36e7347 commit 18f140a

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
pull_request:
2626
branches:
2727
- master
28+
workflow_dispatch:
2829

2930
jobs:
3031
test:
@@ -38,20 +39,20 @@ jobs:
3839
- temurin
3940
- zulu
4041
java-version:
41-
- 8
42-
- 11
42+
- 17
43+
- 21
4344
include:
4445
- platform: windows-latest
4546
java-distribution: adopt-hotspot
46-
java-version: 11
47+
java-version: 17
4748
- platform: macos-latest
4849
java-distribution: adopt-hotspot
49-
java-version: 11
50+
java-version: 17
5051
runs-on: ${{ matrix.platform }}
5152
timeout-minutes: 5
5253
steps:
5354
- name: Checkout
54-
uses: actions/checkout@v3
55+
uses: actions/checkout@v4
5556
- name: Set up JDK
5657
uses: actions/setup-java@v4
5758
with:

pom.xml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<spring-ws.version>2.4.7.RELEASE</spring-ws.version>
8888
<uportal-libs.version>5.13.1</uportal-libs.version>
8989
<uportal-maven-plugin.version>1.0.1</uportal-maven-plugin.version>
90-
<mockito.version>1.10.19</mockito.version>
90+
<mockito.version>5.8.0</mockito.version>
9191

9292
<!-- The JDBC Driver used by the calendar portlet -->
9393
<jdbc.groupId>org.hsqldb</jdbc.groupId>
@@ -924,8 +924,8 @@
924924
<groupId>org.apache.maven.plugins</groupId>
925925
<artifactId>maven-compiler-plugin</artifactId>
926926
<configuration>
927-
<source>1.7</source>
928-
<target>1.7</target>
927+
<source>17</source>
928+
<target>17</target>
929929
</configuration>
930930
</plugin>
931931

@@ -963,7 +963,7 @@
963963
<plugin>
964964
<groupId>org.jvnet.jaxb2.maven2</groupId>
965965
<artifactId>maven-jaxb2-plugin</artifactId>
966-
<version>0.14.0</version>
966+
<version>0.15.3</version>
967967
<executions>
968968
<execution>
969969
<goals>
@@ -994,6 +994,7 @@
994994
<plugin>
995995
<groupId>org.apache.maven.plugins</groupId>
996996
<artifactId>maven-war-plugin</artifactId>
997+
<version>3.4.0</version>
997998
<configuration>
998999
<attachClasses>true</attachClasses>
9991000
<warName>CalendarPortlet</warName>
@@ -1020,6 +1021,13 @@
10201021
</overlay>
10211022
</overlays>
10221023
</configuration>
1024+
<dependencies>
1025+
<dependency>
1026+
<groupId>org.codehaus.plexus</groupId>
1027+
<artifactId>plexus-archiver</artifactId>
1028+
<version>4.9.1</version>
1029+
</dependency>
1030+
</dependencies>
10231031
</plugin>
10241032
<plugin>
10251033
<groupId>com.mycila</groupId>

src/test/java/org/jasig/portlet/calendar/adapter/ExchangeCalendarAdapterTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import static org.junit.Assert.assertEquals;
2222
import static org.junit.Assert.assertNull;
2323
import static org.junit.Assert.assertTrue;
24-
import static org.mockito.Matchers.any;
25-
import static org.mockito.Matchers.anyString;
24+
import static org.mockito.ArgumentMatchers.any;
25+
import static org.mockito.ArgumentMatchers.anyString;
2626
import static org.mockito.Mockito.spy;
2727
import static org.mockito.Mockito.times;
2828
import static org.mockito.Mockito.verify;
@@ -133,7 +133,7 @@ public void setUp() throws IOException {
133133
Source source = new StreamSource(sampleExchangeResponse.getInputStream());
134134
GetUserAvailabilityResponse response =
135135
(GetUserAvailabilityResponse) marshaller.unmarshal(source);
136-
when(webService.marshalSendAndReceive(any(), any(WebServiceMessageCallback.class)))
136+
when(webService.marshalSendAndReceive(any(Object.class), any(WebServiceMessageCallback.class)))
137137
.thenReturn(response);
138138
}
139139

src/test/java/org/jasig/portlet/calendar/mvc/controller/AjaxCalendarControllerTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import static org.junit.Assert.assertFalse;
2323
import static org.junit.Assert.assertNull;
2424
import static org.junit.Assert.assertTrue;
25-
import static org.mockito.Matchers.anyString;
25+
import static org.mockito.ArgumentMatchers.anyString;
2626
import static org.mockito.Mockito.any;
2727
import static org.mockito.Mockito.eq;
2828
import static org.mockito.Mockito.when;
@@ -83,9 +83,14 @@ public void setUp() {
8383
emptyEvents = new HashSet<CalendarDisplayEvent>();
8484
events = new HashSet<CalendarDisplayEvent>();
8585

86+
when(mockHelper.getEventList(any(), any(), any())).thenReturn(emptyEvents);
87+
8688
when(appContext.getMessage(
87-
eq("date.formatter.display"), any(Object[].class), anyString(), any(Locale.class)))
88-
.thenReturn("EEE MMM d");
89+
anyString(),
90+
any(),
91+
anyString(),
92+
any()))
93+
.thenReturn("EEE MMM d");
8994
testee.setApplicationContext(appContext);
9095
}
9196

0 commit comments

Comments
 (0)