diff --git a/README.md b/README.md index cc45c7c..3e9d1aa 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ Deployment. ## Releases ### 1.6.7 - 20XX-XX-XX +- Mitigated build warning about `RandomStringUtils.randomAlphanumeric(int)` being deprecated. ### 1.6.6 - 2024-01-06 diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index d99a216..29b5c2b 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -23,6 +23,7 @@ ]]> diff --git a/src/com/github/johnthagen/cppcheck/CppcheckInspection.java b/src/com/github/johnthagen/cppcheck/CppcheckInspection.java index 373ec12..d4b9c3b 100644 --- a/src/com/github/johnthagen/cppcheck/CppcheckInspection.java +++ b/src/com/github/johnthagen/cppcheck/CppcheckInspection.java @@ -92,7 +92,7 @@ public ProblemDescriptor[] checkFile(@NotNull final PsiFile file, File tempFile = null; try { final CppCheckInspectionImpl inspectionImpl = new CppCheckInspectionImpl(verboseLevel); - tempFile = FileUtil.createTempFile(RandomStringUtils.randomAlphanumeric(8) + "_", vFile.getName(), true); + tempFile = FileUtil.createTempFile(RandomStringUtils.insecure().nextAlphanumeric(8) + "_", vFile.getName(), true); FileUtil.writeToFile(tempFile, document.getText()); final String cppcheckOutput = inspectionImpl.executeCommandOnFile(vFile, cppcheckPathFile, prependIncludeDir(cppcheckOptions, vFile),