Preparing things for OpenJDK 11
This commit is contained in:
parent
5a80e70d93
commit
3a3b81a6a8
|
@ -8,7 +8,7 @@ dist: trusty
|
||||||
|
|
||||||
language: java
|
language: java
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk9
|
- openjdk11
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- MAVEN_OPTS="-Xmx10244M -Xss128M -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=1024M -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"
|
- MAVEN_OPTS="-Xmx10244M -Xss128M -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=1024M -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"
|
||||||
|
|
|
@ -20,7 +20,13 @@ package ca.uhn.fhir.util;
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.net.ConnectException;
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
|
import java.net.Socket;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,6 +34,7 @@ import java.util.LinkedHashSet;
|
||||||
*/
|
*/
|
||||||
@CoverageIgnore
|
@CoverageIgnore
|
||||||
public class PortUtil {
|
public class PortUtil {
|
||||||
|
private static final Logger ourLog = LoggerFactory.getLogger(PortUtil.class);
|
||||||
private static LinkedHashSet<Integer> ourPorts = new LinkedHashSet<>();
|
private static LinkedHashSet<Integer> ourPorts = new LinkedHashSet<>();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -41,20 +48,32 @@ public class PortUtil {
|
||||||
* This is really only used for unit tests but is included in the library so it can be reused across modules. Use with caution.
|
* This is really only used for unit tests but is included in the library so it can be reused across modules. Use with caution.
|
||||||
*/
|
*/
|
||||||
public static int findFreePort() {
|
public static int findFreePort() {
|
||||||
ServerSocket server;
|
|
||||||
try {
|
try {
|
||||||
int port;
|
int port;
|
||||||
do {
|
do {
|
||||||
server = new ServerSocket(0);
|
try (ServerSocket server = new ServerSocket(0)) {
|
||||||
server.setReuseAddress(true);
|
server.setReuseAddress(true);
|
||||||
port = server.getLocalPort();
|
port = server.getLocalPort();
|
||||||
server.close();
|
}
|
||||||
} while (!ourPorts.add(port));
|
} while (!ourPorts.add(port));
|
||||||
|
|
||||||
Thread.sleep(500);
|
// Make sure that we can't connect to the server, meaning the port is
|
||||||
|
// successfully released
|
||||||
|
for (int i = 0; i < 20; i++) {
|
||||||
|
Socket connector = new Socket();
|
||||||
|
try {
|
||||||
|
connector.connect(new InetSocketAddress(port));
|
||||||
|
} catch (ConnectException e) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ourLog.info("Port {} is still in use - Waiting...", port);
|
||||||
|
Thread.sleep(250);
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.sleep(1000);
|
||||||
|
|
||||||
return port;
|
return port;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//FIXME resource leak
|
|
||||||
throw new Error(e);
|
throw new Error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,25 @@
|
||||||
package ca.uhn.fhir.jpa.model.entity;
|
package ca.uhn.fhir.jpa.model.entity;
|
||||||
|
|
||||||
|
/*-
|
||||||
|
* #%L
|
||||||
|
* HAPI FHIR Model
|
||||||
|
* %%
|
||||||
|
* Copyright (C) 2014 - 2018 University Health Network
|
||||||
|
* %%
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* #L%
|
||||||
|
*/
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
public abstract class BaseResourceIndex implements Serializable {
|
public abstract class BaseResourceIndex implements Serializable {
|
||||||
|
|
|
@ -84,7 +84,6 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring -->
|
<!-- Spring -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-beans</artifactId>
|
<artifactId>spring-beans</artifactId>
|
||||||
|
@ -108,6 +107,12 @@
|
||||||
<artifactId>jscience</artifactId>
|
<artifactId>jscience</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Java -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Testing -->
|
<!-- Testing -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -88,6 +88,12 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Java -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring -->
|
<!-- Spring -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>aopalliance</groupId>
|
<groupId>aopalliance</groupId>
|
||||||
|
|
10
pom.xml
10
pom.xml
|
@ -538,8 +538,8 @@
|
||||||
<servicemix_saxon_version>9.5.1-5_1</servicemix_saxon_version>
|
<servicemix_saxon_version>9.5.1-5_1</servicemix_saxon_version>
|
||||||
<servicemix_xmlresolver_version>1.2_5</servicemix_xmlresolver_version>
|
<servicemix_xmlresolver_version>1.2_5</servicemix_xmlresolver_version>
|
||||||
<slf4j_version>1.7.25</slf4j_version>
|
<slf4j_version>1.7.25</slf4j_version>
|
||||||
<spring_version>5.0.8.RELEASE</spring_version>
|
<spring_version>5.1.3.RELEASE</spring_version>
|
||||||
<spring_data_version>2.0.7.RELEASE</spring_data_version>
|
<spring_data_version>2.1.3.RELEASE</spring_data_version>
|
||||||
<spring-boot.version>1.5.6.RELEASE</spring-boot.version>
|
<spring-boot.version>1.5.6.RELEASE</spring-boot.version>
|
||||||
|
|
||||||
<stax2_api_version>3.1.4</stax2_api_version>
|
<stax2_api_version>3.1.4</stax2_api_version>
|
||||||
|
@ -628,7 +628,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.errorprone</groupId>
|
<groupId>com.google.errorprone</groupId>
|
||||||
<artifactId>error_prone_core</artifactId>
|
<artifactId>error_prone_core</artifactId>
|
||||||
<version>2.3.1</version>
|
<version>2.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
|
@ -1359,7 +1359,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.errorprone</groupId>
|
<groupId>com.google.errorprone</groupId>
|
||||||
<artifactId>error_prone_core</artifactId>
|
<artifactId>error_prone_core</artifactId>
|
||||||
<version>2.3.1</version>
|
<version>2.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
@ -2222,8 +2222,10 @@
|
||||||
<module>hapi-fhir-cli</module>
|
<module>hapi-fhir-cli</module>
|
||||||
<module>hapi-fhir-dist</module>
|
<module>hapi-fhir-dist</module>
|
||||||
<module>examples</module>
|
<module>examples</module>
|
||||||
|
<!--
|
||||||
<module>osgi/hapi-fhir-karaf-features</module>
|
<module>osgi/hapi-fhir-karaf-features</module>
|
||||||
<module>osgi/hapi-fhir-karaf-integration-tests</module>
|
<module>osgi/hapi-fhir-karaf-integration-tests</module>
|
||||||
|
-->
|
||||||
<module>example-projects/hapi-fhir-base-example-embedded-ws</module>
|
<module>example-projects/hapi-fhir-base-example-embedded-ws</module>
|
||||||
<module>example-projects/hapi-fhir-standalone-overlay-example</module>
|
<module>example-projects/hapi-fhir-standalone-overlay-example</module>
|
||||||
<module>example-projects/hapi-fhir-jpaserver-cds-example</module>
|
<module>example-projects/hapi-fhir-jpaserver-cds-example</module>
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
latest versions (dependent HAPI modules listed in brackets):
|
latest versions (dependent HAPI modules listed in brackets):
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>Spring (JPA): 5.0.8 -> 5.1.3</li>
|
||||||
|
<li>Spring Data (JPA): 2.0.7 -> 2.1.3</li>
|
||||||
<li>thymeleaf-spring4 (Testpage Overlay) has been replaced with thymeleaf-spring5</li>
|
<li>thymeleaf-spring4 (Testpage Overlay) has been replaced with thymeleaf-spring5</li>
|
||||||
</ul>
|
</ul>
|
||||||
]]>
|
]]>
|
||||||
|
|
Loading…
Reference in New Issue