ACCP uses the incorrect variable when constructing the exception thrown for incorrect key parameters. In EvpKey.nativeParams() on line 122, it is currently using the variable encoded rather than encodedParams. This means that rather reporting on the incorrect parameters (stored in encodedParams) it is trying to report on the fully encoded copy of the key (which is stored in encoded). This second variable (encoded) is lazily calculated and cached so if nativeParams() fails before an encoded copy of the key is retrieved, a second NullPointerException is thrown when handling encoded.
ACCP uses the incorrect variable when constructing the exception thrown for incorrect key parameters. In
EvpKey.nativeParams()
on line 122, it is currently using the variableencoded
rather thanencodedParams
. This means that rather reporting on the incorrect parameters (stored inencodedParams
) it is trying to report on the fully encoded copy of the key (which is stored inencoded
). This second variable (encoded
) is lazily calculated and cached so ifnativeParams()
fails before an encoded copy of the key is retrieved, a secondNullPointerException
is thrown when handling encoded.