diff --git a/.github/workflows/build/action.yml b/.github/workflows/build/action.yml index 03524c4d28..af3ae01f4c 100644 --- a/.github/workflows/build/action.yml +++ b/.github/workflows/build/action.yml @@ -3,10 +3,10 @@ description: 'Build SWC' runs: using: 'composite' steps: - - name: Set up JDK 17 + - name: Set up JDK 11 uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '11' distribution: 'corretto' cache: maven - name: Build with Maven diff --git a/pom.xml b/pom.xml index 3f5ebcd244..e44b8c72a7 100644 --- a/pom.xml +++ b/pom.xml @@ -13,8 +13,8 @@ - 17 - 17 + 11 + 11 ${project.build.directory}/${project.build.finalName} diff --git a/src/test/java/org/sagebionetworks/web/unitserver/servlet/AliasRedirectorServletTest.java b/src/test/java/org/sagebionetworks/web/unitserver/servlet/AliasRedirectorServletTest.java index 09c8e98cc5..b46a4ae153 100644 --- a/src/test/java/org/sagebionetworks/web/unitserver/servlet/AliasRedirectorServletTest.java +++ b/src/test/java/org/sagebionetworks/web/unitserver/servlet/AliasRedirectorServletTest.java @@ -2,6 +2,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Matchers.anyList; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; @@ -63,8 +64,7 @@ public void setup() throws IOException, SynapseException, JSONObjectAdapterException { MockitoAnnotations.initMocks(this); servlet = new AliasRedirectorServlet(); - when(mockSynapseProvider.createNewClient(anyString())) - .thenReturn(mockSynapse); + when(mockSynapseProvider.createNewClient(any())).thenReturn(mockSynapse); servlet.setSynapseProvider(mockSynapseProvider); @@ -148,8 +148,9 @@ public void testDoGetTeamAlias() throws Exception { @Test public void testDoGetError() throws Exception { String errorMessage = "An error from the service call"; - when(mockSynapse.getUserGroupHeadersByAliases(anyList())) + when(mockSynapse.getUserGroupHeadersByAliases(any())) .thenThrow(new SynapseForbiddenException(errorMessage)); + servlet.doGet(mockRequest, mockResponse); // redirects to an error place