SterniXPutzig
SterniXPutzig
Explore posts from servers
JCHJava Community | Help. Code. Learn.
Created by SterniXPutzig on 4/25/2025 in #java-help
SLF4J crashes jenkins
Hi, I have a project that has several spring boot starter dependencies (v3.4.5) (they in turn have slf4j v1.7.36 as a dependency.) Now i tried to make a jenkins pipeline (with a sonarqube server stage). But the
sonar-maven-plugin:3.9.1.2184
sonar-maven-plugin:3.9.1.2184
fails because an
.atInfo()
.atInfo()
method does not exist (which afaik was added in 2.0 of slf4j) I'm aware of being able to exclude the slf4j v1.7.36 from the spring starter dependencies and explicitly naming the e.g. v2.0.17, but I'd like to know if that is safe (couldnt find any direct answer online) And I'm not sure how extensive testing would need to be to ensure it's safe. TL:DR: is it safe to exclude the slf4j v1.7.36 from spring boot starter dependencies and explicitly add v2.X.X to prevent
sonar-maven-plugin:3.9.1.2184
sonar-maven-plugin:3.9.1.2184
from crashing the jenkins pipeline? thanks in advance 🙂
78 replies
JCHJava Community | Help. Code. Learn.
Created by SterniXPutzig on 3/27/2024 in #java-help
newline after Mockito verify call fails the test
hi, im trying to verify a logger method call with this code line:
verify(loggerSpy).debug("some text {}", someArg);
verify(loggerSpy).debug("some text {}", someArg);
when i execute the test it fails due to a "Comparison" error comparing the expected
log4jLogger.debug(
"some text {}",
someArg
);
log4jLogger.debug(
"some text {}",
someArg
);
to the actual:
log4jLogger.debug(
"some text {}",
someArg
);
\n
log4jLogger.debug(
"some text {}",
someArg
);
\n
shows the difference is after the codeline has ended (notice the newline after the "Actual" value)(i put a \n to help visualize it since three backtick syntax would remove trailing newlines) How can i include that newline into the "expected"? Or tell Mockito to ignore the trailing newline?
17 replies
DHDistant Horizons
Created by SterniXPutzig on 3/21/2024 in #help-me
how to extend overdraw prevention past the "Heavy" setting?
No description
6 replies