You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on some things in keyext.rusty I was taking a look at EqualsModProofIrrelevancy in key.util to see where it is used and how it works. The test class for EqualsModProofIrrelevancy looks like the following:
What stood out to me was that proof1 and proof2 are both initialized with the proof from env, instead of using env2 for proof2.
Is it supposed to be like this, or should env2 be used to initialize proof2?
Because applying the change results in the test not passing on my machine.
Reproducible
always
Steps to reproduce
Use env2 instead of env in the line Proof proof2 = env.getLoadedProof();
Run the test
Test fails
Additional information
I also see another potential problem in the implementation of equalsModProofIrrelevancy in TacletApp.java with one if statement:
Judging by the checks for null, it should be possible that missingVars and that.missingVars are both null, which would cause a NullPointerException in the first line. It would also be possible to get a NullPointerException in the second line.
Does a scenario not occur where a NullPointerException can be thrown?
Description
While working on some things in
keyext.rusty
I was taking a look at EqualsModProofIrrelevancy inkey.util
to see where it is used and how it works. The test class for EqualsModProofIrrelevancy looks like the following:What stood out to me was that
proof1
andproof2
are both initialized with the proof fromenv
, instead of usingenv2
forproof2
.Is it supposed to be like this, or should
env2
be used to initializeproof2
?Because applying the change results in the test not passing on my machine.
Reproducible
always
Steps to reproduce
env2
instead ofenv
in the lineProof proof2 = env.getLoadedProof();
Additional information
I also see another potential problem in the implementation of
equalsModProofIrrelevancy
inTacletApp.java
with one if statement:Judging by the checks for
null
, it should be possible thatmissingVars
andthat.missingVars
are both null, which would cause aNullPointerException
in the first line. It would also be possible to get aNullPointerException
in the second line.Does a scenario not occur where a
NullPointerException
can be thrown?The text was updated successfully, but these errors were encountered: