guava icon indicating copy to clipboard operation
guava copied to clipboard

Make ExceptionTypePolicy in NullPointerTester public

Open gandhishrey opened this issue 3 years ago • 0 comments

NullPointerTester in guava-testlib has support for testing against different exception types based on a private enum ExceptionTypePolicy. However, this is currently set as a private field with no constructor or setter taking this as an input.

Setting an ExceptionTypePolicy or list of expected Throwables will be particularly useful for repos which throw IllegalArgumentException instead of NullPointerException for null inputs.

gandhishrey avatar Aug 15 '22 23:08 gandhishrey