Closed rburgst closed 3 weeks ago
yes, the problem is gone once I remove the dependency in my buildSrc/build.gradle
. The question is why this is happening (actually, it was working before I upgraded all dependencies of the app).
Hi! Thank you for reporting your issue.
DependencyCheck 9.1.0
is using commons-io:commons-io:2.15.0
, you may face a dependency version resolution issue.
The failing method seems to have been added in commons-io:commons-io:2.12.0
:
/**
* Returns the given charset if non-null, otherwise return defaultCharset.
*
* @param charset The charset to test, may be null.
* @param defaultCharset The charset to return if charset is null, may be null.
* @return a Charset .
* @since 2.12.0
*/
public static Charset toCharset(final Charset charset, final Charset defaultCharset) {
return charset == null ? defaultCharset : charset;
}
Do you see any improvement by upgrading to the commons-io:commons-io:2.12.0
version?
Yes, actually I removed the dependency in my buildSrc/build.gradle
as I wasnt needing it after all. Its just funny that Gradle didnt automatically upgrade the dependency as dependencycheck would specify the newer version.
Describe the bug The gradle plugin fails on analyzing a spring boot 3.2.5 project with the error
Version of dependency-check used The problem occurs using version 9.1.0 of the gradle plugin
Log file
To Reproduce Steps to reproduce the behavior:
gradlew dependencyCheckAggregate
(or analyze, does not matter)Expected behavior No error should happen
Additional context in my
buildSrc/build.gradle
I have the following dependency which might be related?