Support Java 14 (#3310)

* Support Java 14

* Provide changes to avoid deprecated Java API
and have a compatibility back to Java 8
* Change affected test classes to JUnit 5 whenever it is possible
* Ignore/Disable some TCP/IP tests which don't pass on Java 14

* Fix (some) TCP tests on JRE 14

* Fix SSL Handshake test - client side handshake is successful with java 14

- change the badClient cert to a badServer cert to force an error on the client side

Co-authored-by: artembilan <raven666>
Co-authored-by: Gary Russell <grussell@pivotal.io>
This commit is contained in:
Artem Bilan
2020-06-17 14:00:06 -04:00
committed by GitHub
parent b0cd0156c7
commit 3f5aba2cb9
53 changed files with 613 additions and 671 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019 the original author or authors.
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package org.springframework.integration.rsocket;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -66,17 +67,17 @@ class IntegrationRSocketMessageHandler extends RSocketMessageHandler {
public boolean detectEndpoints() {
ApplicationContext applicationContext = getApplicationContext();
boolean endpointsDetected = false;
if (applicationContext != null && getHandlerMethods().isEmpty()) {
return applicationContext
.getBeansOfType(IntegrationRSocketEndpoint.class)
.values()
.stream()
.peek(this::addEndpoint)
.count() > 0;
}
else {
return false;
Collection<IntegrationRSocketEndpoint> endpoints =
applicationContext.getBeansOfType(IntegrationRSocketEndpoint.class)
.values();
for (IntegrationRSocketEndpoint endpoint : endpoints) {
addEndpoint(endpoint);
endpointsDetected = true;
}
}
return endpointsDetected;
}
public void addEndpoint(IntegrationRSocketEndpoint endpoint) {