Always true condition in ClassSpecializer constructor
Andrey Turbanov
turbanoff at gmail.com
Sat Jun 18 19:35:42 UTC 2022
Hello.
I found suspicious null check in java.lang.invoke.ClassSpecializer constructor:
S topSpecies = null;
if (tsk != null && topSpecies == null) {
// if there is a key, build the top species if needed:
topSpecies = findSpecies(tsk);
}
'null' is assigned to the 'topSpecies' variable and then, in the next
statement, it's compared with 'null'. Second part of the condition
will always be true.
Andrey Turbanov
More information about the core-libs-dev
mailing list