Bump to JDK8

This commit is contained in:
jamesagnew 2018-03-30 08:54:04 -04:00
parent 817569228b
commit 673a3d6272
5 changed files with 26 additions and 17 deletions

View File

@ -25,5 +25,5 @@ before_script:
script: script:
# - mvn -e -B clean install && cd hapi-fhir-ra && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID clean test jacoco:report coveralls:report # - mvn -e -B clean install && cd hapi-fhir-ra && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID clean test jacoco:report coveralls:report
# - mvn -Dci=true -e -B -P ALLMODULES,NOPARALLEL,ERRORPRONE clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report # - mvn -Dci=true -e -B -P ALLMODULES,NOPARALLEL,ERRORPRONE clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report
- mvn -Dci=true -e -B -P ALLMODULES,REDUCED_JPA_TESTS,ERRORPRONE_JDK8 clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report - mvn -Dci=true -e -B -P ALLMODULES,REDUCED_JPA_TESTS,ERRORPRONE_JDK8,JACOCO clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report

View File

@ -32,7 +32,7 @@
<configuration> <configuration>
<signature> <signature>
<groupId>org.codehaus.mojo.signature</groupId> <groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java17</artifactId> <artifactId>java18</artifactId>
<version>1.0</version> <version>1.0</version>
</signature> </signature>
</configuration> </configuration>

View File

@ -1129,7 +1129,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
} }
@Test @Test
public void testTransactionCreateWithLinks() throws IOException { public void testTransactionCreateWithLinks() {
Bundle request = new Bundle(); Bundle request = new Bundle();
request.setType(BundleType.TRANSACTION); request.setType(BundleType.TRANSACTION);
@ -1492,7 +1492,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
} }
@Test @Test
public void testTransactionDoesNotLeavePlaceholderIds() throws Exception { public void testTransactionDoesNotLeavePlaceholderIds() {
String input; String input;
try { try {
input = IOUtils.toString(getClass().getResourceAsStream("/cdr-bundle.json"), StandardCharsets.UTF_8); input = IOUtils.toString(getClass().getResourceAsStream("/cdr-bundle.json"), StandardCharsets.UTF_8);
@ -1515,7 +1515,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
} }
@Test @Test
public void testTransactionDoesntDoubleCreate() throws IOException { public void testTransactionDoesntDoubleCreate() {
Bundle output, input; Bundle output, input;
BundleEntryResponseComponent respEntry; BundleEntryResponseComponent respEntry;
IdType createdId; IdType createdId;
@ -2051,7 +2051,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
assertThat(nextEntry.getResponse().getLocation(), not(containsString("test"))); assertThat(nextEntry.getResponse().getLocation(), not(containsString("test")));
assertEquals(id.toVersionless(), p.getIdElement().toVersionless()); assertEquals(id.toVersionless(), p.getIdElement().toVersionless());
assertNotEquals(id, p.getId()); assertNotEquals(id, p.getId());
assertThat(p.getId().toString(), endsWith("/_history/2")); assertThat(p.getId(), endsWith("/_history/2"));
nextEntry = resp.getEntry().get(0); nextEntry = resp.getEntry().get(0);
assertEquals(Constants.STATUS_HTTP_200_OK + " OK", nextEntry.getResponse().getStatus()); assertEquals(Constants.STATUS_HTTP_200_OK + " OK", nextEntry.getResponse().getStatus());
@ -2177,7 +2177,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
} }
@Test @Test
public void testTransactionWIthInvalidPlaceholder() throws Exception { public void testTransactionWIthInvalidPlaceholder() {
Bundle res = new Bundle(); Bundle res = new Bundle();
res.setType(BundleType.TRANSACTION); res.setType(BundleType.TRANSACTION);
@ -2875,7 +2875,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
} }
@Test @Test
public void testTransactionWithRelativeOidIds() throws Exception { public void testTransactionWithRelativeOidIds() {
Bundle res = new Bundle(); Bundle res = new Bundle();
res.setType(BundleType.TRANSACTION); res.setType(BundleType.TRANSACTION);
@ -3018,7 +3018,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
* This is not the correct way to do it, but we'll allow it to be lenient * This is not the correct way to do it, but we'll allow it to be lenient
*/ */
@Test @Test
public void testTransactionWithRelativeOidIdsQualified() throws Exception { public void testTransactionWithRelativeOidIdsQualified() {
Bundle res = new Bundle(); Bundle res = new Bundle();
res.setType(BundleType.TRANSACTION); res.setType(BundleType.TRANSACTION);

View File

@ -1,14 +1,18 @@
package ca.uhn.fhirtest.interceptor; package ca.uhn.fhirtest.interceptor;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.util.*;
import ca.uhn.fhir.jpa.provider.BaseJpaSystemProvider; import ca.uhn.fhir.jpa.provider.BaseJpaSystemProvider;
import ca.uhn.fhir.jpa.provider.dstu3.TerminologyUploaderProviderDstu3; import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException;
import ca.uhn.fhir.rest.server.interceptor.auth.*; import ca.uhn.fhir.rest.server.interceptor.auth.AuthorizationInterceptor;
import ca.uhn.fhir.rest.server.interceptor.auth.IAuthRule;
import ca.uhn.fhir.rest.server.interceptor.auth.RuleBuilder;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import static org.apache.commons.lang3.StringUtils.isBlank;
public class PublicSecurityInterceptor extends AuthorizationInterceptor { public class PublicSecurityInterceptor extends AuthorizationInterceptor {
@ -30,7 +34,7 @@ public class PublicSecurityInterceptor extends AuthorizationInterceptor {
if (isBlank(authHeader)) { if (isBlank(authHeader)) {
return new RuleBuilder() return new RuleBuilder()
.deny().operation().named(BaseJpaSystemProvider.MARK_ALL_RESOURCES_FOR_REINDEXING).onServer().andThen() .deny().operation().named(BaseJpaSystemProvider.MARK_ALL_RESOURCES_FOR_REINDEXING).onServer().andThen()
.deny().operation().named(TerminologyUploaderProviderDstu3.UPLOAD_EXTERNAL_CODE_SYSTEM).onServer().andThen() .deny().operation().named(TerminologyUploaderProvider.UPLOAD_EXTERNAL_CODE_SYSTEM).onServer().andThen()
.allowAll() .allowAll()
.build(); .build();
} }

View File

@ -2020,12 +2020,17 @@
<module>example-projects/hapi-fhir-jpaserver-dynamic</module> <module>example-projects/hapi-fhir-jpaserver-dynamic</module>
<module>tests/hapi-fhir-base-test-mindeps-client</module> <module>tests/hapi-fhir-base-test-mindeps-client</module>
<module>tests/hapi-fhir-base-test-mindeps-server</module> <module>tests/hapi-fhir-base-test-mindeps-server</module>
<module>hapi-fhir-jacoco</module>
<module>hapi-fhir-igpacks</module> <module>hapi-fhir-igpacks</module>
<module>hapi-fhir-spring-boot</module> <module>hapi-fhir-spring-boot</module>
<!--<module>hapi-fhir-osgi-core</module>--> <!--<module>hapi-fhir-osgi-core</module>-->
</modules> </modules>
</profile> </profile>
<profile>
<id>JACOCO</id>
<modules>
<module>hapi-fhir-jacoco</module>
</modules>
</profile>
<profile> <profile>
<id>NOPARALLEL</id> <id>NOPARALLEL</id>
<build> <build>