-
Notifications
You must be signed in to change notification settings - Fork 4
Fix potential null pointer exceptions #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/main/java/com/ironcorelabs/tenantsecurity/kms/v1/DeterministicCryptoUtils.java
Show resolved
Hide resolved
coltfred
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing those oversights and making it easier to run all the tests. Just the one request.
src/main/java/com/ironcorelabs/tenantsecurity/kms/v1/BatchDocumentKeys.java
Outdated
Show resolved
Hide resolved
coltfred
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple minor asks, but looks good beyond that.
| @@ -0,0 +1,6 @@ | |||
| package com.ironcorelabs.tenantsecurity.kms.v1; | |||
|
|
|||
| class VoidSecurityEventResponse extends NullParsingValidator { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should comment this class I think. At first I wasn't sure why we'd want this, so I definitely won't remember in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up going a different way with it. I made an overload of makeRequestAndParseFailure for Void that doesn't do the parsing (and doesn't have the NullParsingValidator requirement). This let me delete the VoidSecurityEventResponse class altogether
This fixes a potential issue when the TSP sends empty (or null) data back to the TSC. Instead of a NullPointerException it will now be returned as a regular TSC error.
Also fixes a few miscellaneous bugs along the way - incorrect construction of a DeterministicPlaintextField and several tests that didn't get updated for the new allowInsecureHttp flag. The CI was changed to run all the tests to ensure these don't slip through again.