Closed xsalefter closed 2 years ago
@xsalefter https://github.com/killbill/killbill/pull/1762 has been merged.
tested against killbill
. FYI, copy-constructor to Throwable
was mistake. Copying from commit desc:
TestPermissionAnnotationMethodInterceptor#verifyAopedTester() in killbill repository show that #cause maybe used to determine actual exception type.
In other words,
private void verifyAopedTester(final IAopTester aopedTester) {
// Anonymous user
logout();
try {
aopedTester.createRefund();
Assert.fail();
} catch (UnauthenticatedException e) {
// Good!
} catch (Exception e) {
Assert.fail(e.getLocalizedMessage());
}
// ... Other part of code
}
Wrapping Throwable
make test go to Exception
block (instead of UnauthenticatedException
)
Decide to use defensive copy for Throwable.
Use
<XXX>.copyOf()
for List and Map. This probably cause an issue if other repositories modify those attribute, and need to test. UnfortunatelyDefaultBlockingState
inkillbill
repository still not up-to-date with the latest API interfaces fromkillbill-api
and have unimplemented interfaces, thus put this as draft.Add Joda's
Period
andDateTime
inspotbugs-exclude.xml
. Most of Joda classeses are immutable.