Comment by corbezzoli
2 years ago
> There is still the chance
There's no chance if you avoid random_person1 and use known_oss_provider’s package instead. At the very least, look at the tests.
Any package with tests is guaranteed to be more correct than a never-before-run SO answer.
There is still the chance. As the article states, OpenJDK copied from the Stack Overflow answer.
Sure, but if OpenJDK is exposing that function then anyone who is using it will get the correct output when OpenJDK fixes the problem. If everyone copies the function into their own code then in many cases it's likely to never be corrected.
What if you write the code and test in your project?