bdemers commented on PR #1454:
URL: https://github.com/apache/shiro/pull/1454#issuecomment-2096972660
I started hacking a custom Assertion class up, and IMHO, it's too complex
for the value it provides.
The value is essentially, working around a valid compiler warning. The
better solution for that is doing something like:
`@SuppressWarnings("unchecked")` to the relevant tests. We have a bunch of
suppressions in the tests already.
My current plan is to open an issue to fix the generic type defs, and mark
the effected test methods with something like:
```java
@SuppressWarning("unchecked") // TODO: Remove this warning when issue #xxxx
is resolved
public void someTestMethod() {
// ...
assertThat(env).containsEntry(Context.SECURITY_PRINCIPAL, "foo");
// ...
}
```
Any objections to this approach?
> [!NOTE]
> I do think custom assertion classes could be useful in other places, just
in this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]