clion-cppcheck icon indicating copy to clipboard operation
clion-cppcheck copied to clipboard

mitigated build warning about `RandomStringUtils.randomAlphanumeric(int)` being deprecated - fixes #102

Open firewave opened this issue 1 year ago • 1 comments

firewave avatar Jan 03 '25 15:01 firewave

The documentation here is not very helpful: https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/RandomStringUtils.html#randomAlphanumeric(int).

Simply adding insecure() as suggested producing a warning about using a static method via an instance. And the fixit for that sends us back to the same code as before. So I used the visible implementation of the deprecated method as basis.

firewave avatar Jan 03 '25 15:01 firewave