Skip to content

Fix potential null pointer exceptions#159

Merged
giarc3 merged 9 commits intomainfrom
fix-null-pointer-exceptions
Jan 30, 2026
Merged

Fix potential null pointer exceptions#159
giarc3 merged 9 commits intomainfrom
fix-null-pointer-exceptions

Conversation

@giarc3
Copy link
Member

@giarc3 giarc3 commented Jan 27, 2026

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.

Copy link
Member

@coltfred coltfred left a 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.

Copy link
Member

@coltfred coltfred left a 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 {
Copy link
Member

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.

Copy link
Member Author

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

@giarc3 giarc3 merged commit b2f820e into main Jan 30, 2026
7 checks passed
@giarc3 giarc3 deleted the fix-null-pointer-exceptions branch January 30, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants