Merge remote-tracking branch 'origin/4.2.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2024 the original author or authors.
|
||||
* Copyright 2013-2025 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.
|
||||
@@ -369,7 +369,10 @@ public class SpringMvcContract extends Contract.BaseContract implements Resource
|
||||
data.template().query(resolve(nameValueResolver.getName()), resolve(nameValueResolver.getValue()));
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("Negated params are not supported: " + param);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Negated params are not supported by Feign and ignored during parameter processing: "
|
||||
+ param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2024 the original author or authors.
|
||||
* Copyright 2013-2025 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.
|
||||
@@ -68,6 +68,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
|
||||
import static feign.CollectionFormat.CSV;
|
||||
import static feign.CollectionFormat.SSV;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
@@ -509,11 +510,11 @@ class SpringMvcContractTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testProcessAnnotations_ParseParams_NotEqualParams() throws Exception {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> {
|
||||
Method method = TestTemplate_ParseParams.class.getDeclaredMethod("notEqualParams");
|
||||
void testProcessAnnotations_ParseParams_NegatedParams() {
|
||||
assertThatCode(() -> {
|
||||
Method method = TestTemplate_ParseParams.class.getDeclaredMethod("negatedParams");
|
||||
contract.parseAndValidateMetadata(method.getDeclaringClass(), method);
|
||||
});
|
||||
}).doesNotThrowAnyException();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -831,7 +832,7 @@ class SpringMvcContractTests {
|
||||
ResponseEntity<TestObject> mixParams();
|
||||
|
||||
@GetMapping(value = "test", params = { "p1!=1" })
|
||||
ResponseEntity<TestObject> notEqualParams();
|
||||
ResponseEntity<TestObject> negatedParams();
|
||||
|
||||
@GetMapping(value = "test", params = { "p1=1" })
|
||||
ResponseEntity<TestObject> paramsAndRequestParam(@RequestParam("p2") String p2);
|
||||
|
||||
Reference in New Issue
Block a user