Make assertions based on Annotation#toString() lenient
The behavior for the toString() implementation for annotations changed in JDK 19, per my request to the JDK team (see link below). Specifically, since JDK 19, the toString() implementation for annotation proxies created by the JDK started using canonical names instead of binary names for types. See https://bugs.openjdk.org/browse/JDK-8281462
This commit is contained in:
@@ -220,8 +220,8 @@ class HttpServiceMethodTests {
|
||||
.isThrownBy(() -> this.proxyFactory.createClient(serviceInterface))
|
||||
.withMessageContainingAll(
|
||||
"Multiple @HttpExchange annotations found on " + serviceInterface,
|
||||
"@" + HttpExchange.class.getName(),
|
||||
"@" + ExtraHttpExchange.class.getName()
|
||||
HttpExchange.class.getSimpleName(),
|
||||
ExtraHttpExchange.class.getSimpleName()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -234,8 +234,8 @@ class HttpServiceMethodTests {
|
||||
.isThrownBy(() -> this.proxyFactory.createClient(serviceInterface))
|
||||
.withMessageContainingAll(
|
||||
"Multiple @HttpExchange annotations found on method " + method,
|
||||
"@" + PostExchange.class.getName(),
|
||||
"@" + PutExchange.class.getName()
|
||||
PostExchange.class.getSimpleName(),
|
||||
PutExchange.class.getSimpleName()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user