-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[java] Make LawOfDemeter results deterministic #4549
Conversation
Generated by 🚫 Danger |
Ok, the baseline seems to have been created with a different order of the reaching assignments. I'll give it a try and remove the |
pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/LawOfDemeterRule.java
Outdated
Show resolved
Hide resolved
Maybe a better fix would be to replace all |
…gn/LawOfDemeterRule.java Co-authored-by: Clément Fournier <[email protected]>
I wanted to make it minimally invasive. I can give it a shot, though... |
…able iteration order
I've updated the Dataflow code now. I needed to swap the test case again - that means, if this was really the reason for the random results, then we should get the numbers from the first run again:
But it should be stable now... |
Describe the PR
I believe, this should fix the spurious differing results in the regression tester. At least, I could reproduce on first try the problem when reversing the order of the reaching assignments.
That should then make the test-case-3 of pmd/pmd-regression-tester#119 happy.
Ready?
./mvnw clean verify
passes (checked automatically by github actions)