First preparation for JDK 9 (#674)

* First preparation to build HawkBit with JDK 9

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>

* Reverted Mockito 2 update since it is not compiling under JDK 8 anymore

* Fix for JDK internal calls by old version

* Guava raised to 25.0-jre and CQ added.

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>

* Add updated RabbitMQ http client

* Exclude test dependencies.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Exclusions for unnecessary Guava dependencies added

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>

* Remove provided annotation dependency for maven plugin

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>
This commit is contained in:
Dominic Schabel
2018-05-14 09:32:12 +02:00
committed by Kai Zimmermann
parent ffda7ecc85
commit 1deb47a4db
8 changed files with 155 additions and 63 deletions

View File

@@ -54,7 +54,6 @@ public class IpUtilTest {
public void getRemoteAddrFromRequestIfForwaredHeaderNotPresent() {
final URI knownRemoteClientIP = IpUtil.createHttpUri("127.0.0.1");
when(requestMock.getHeader(X_FORWARDED_FOR)).thenReturn(null);
when(requestMock.getRemoteAddr()).thenReturn(knownRemoteClientIP.getHost());
final URI remoteAddr = IpUtil.getClientIpFromRequest(requestMock, KNOWN_REQUEST_HEADER);
@@ -71,8 +70,6 @@ public class IpUtilTest {
public void maskRemoteAddrIfDisabled() {
final URI knownRemoteClientIP = IpUtil.createHttpUri("***");
when(requestMock.getHeader(X_FORWARDED_FOR)).thenReturn(null);
when(requestMock.getRemoteAddr()).thenReturn(knownRemoteClientIP.getHost());
when(securityPropertyMock.getClients()).thenReturn(clientMock);
when(clientMock.getRemoteIpHeader()).thenReturn(KNOWN_REQUEST_HEADER);
when(clientMock.isTrackRemoteIp()).thenReturn(false);
@@ -91,7 +88,6 @@ public class IpUtilTest {
final URI knownRemoteClientIP = IpUtil.createHttpUri("10.99.99.1");
when(requestMock.getHeader(X_FORWARDED_FOR)).thenReturn(knownRemoteClientIP.getHost());
when(requestMock.getRemoteAddr()).thenReturn(null);
final URI remoteAddr = IpUtil.getClientIpFromRequest(requestMock, "X-Forwarded-For");