Closed agentgt closed 2 months ago
Well, I think it's more that ConfigParser is missing the @NonNullApi
... and that cascades to there being that missing null check on the inputStream. So adding that in shows us that issue. Should actually move the @NonNullApi
to the package level (but yeah a bit of time pressure when extracting the ConfigParser interface and that got missed).
So I know Avaje does not use the newer TYPE_USE aka JSpecify-like annotations yet but you still promise to respect API and thus API has to be annotated
@Nullable
.The above is why I don't use JSR 305 and something stronger like Checkerframework.
I would consider seriously switching to it in the long run given I could find something like this just glancing. (I'm not trying to be rude it just is a reality).
EDIT funny I'm not even sure if it will fail at the
try
eagerly but still its a NPE that should not happen.EDIT it does not fail at the
try
as obviously you can havenull
which for some reason I was not expecting but makes sense.