Merge branch '3.1.x'
This commit is contained in:
@@ -33,6 +33,7 @@ import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.exc.InvalidDefinitionException;
|
||||
import com.fasterxml.jackson.databind.ser.FilterProvider;
|
||||
import com.fasterxml.jackson.databind.ser.PropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
|
||||
@@ -93,7 +94,9 @@ public final class MetadataUtil {
|
||||
return MAPPER.readerForUpdating(objectToMerge).readValue(bytes);
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (e.getClass().toString().contains("InaccessibleObjectException")) {
|
||||
if (e.getClass().toString().contains("InaccessibleObjectException")
|
||||
|| (e instanceof InvalidDefinitionException
|
||||
&& e.getMessage().contains("InaccessibleObjectException"))) {
|
||||
// JDK 16 workaround - ObjectMapper seems not be JDK16 compatible
|
||||
// with the setup present in Spring Cloud Contract. So we will not
|
||||
// allow patching but we will just copy values from the patch to
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.cloud.contract.verifier.messaging.amqp
|
||||
|
||||
import com.rabbitmq.client.Channel
|
||||
import org.mockito.exceptions.verification.WantedButNotInvoked
|
||||
import spock.lang.IgnoreIf
|
||||
import spock.lang.Specification
|
||||
|
||||
import org.springframework.amqp.core.Binding
|
||||
@@ -41,7 +40,6 @@ import static org.springframework.amqp.support.converter.DefaultClassMapper.DEFA
|
||||
/**
|
||||
* @author Mathias Düsterhöft
|
||||
*/
|
||||
@IgnoreIf({ jvm.isJava17Compatible() })
|
||||
class SpringAmqpStubMessagesSpec extends Specification {
|
||||
|
||||
RabbitTemplate rabbitTemplate = mock(RabbitTemplate.class)
|
||||
|
||||
@@ -19,8 +19,6 @@ package org.springframework.cloud.contract.verifier.messaging.amqp;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||
import org.junit.jupiter.api.condition.JRE;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
@@ -28,7 +26,6 @@ class AmqpMetadataTests {
|
||||
|
||||
YAMLMapper mapper = new YAMLMapper();
|
||||
|
||||
@DisabledOnJre(JRE.JAVA_17)
|
||||
@Test
|
||||
void should_parse_the_metadata_entry() throws JsonProcessingException {
|
||||
// @formatter:off
|
||||
|
||||
Reference in New Issue
Block a user