Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[FIXED JENKINS-46088] Stop double-transforming casts in declarations #37
We were, well, double-transforming here. Transforming the
So let's just transform the whole DeclarationExpression once. Gets us
We were, well, double-transforming here. Transforming the DeclarationExpression after adding the transformed CastExpression to it resulted in a checkedStaticCall to Checker.checkedCast! That...was not desirable. I believe this caused some other issues where you could get mysterious Collections.toArray, Checker.checkedStaticCall, and Checker.checkedCall related RejectedAccessExceptions, based on inspecting the resulting AST from the double-transform approach. So let's just transform the whole DeclarationExpression once. Gets us the goal we want without the double transformation.
jglick left a comment
I have low confidence in this fix. Clearly the original fix was wrong somehow and this corrects a regression; what the impact on other cases is, I am less sure.
BTW @kohsuke comments on the hackish SECURITY-566 fix in