allure-framework / allure-java

Allure integrations for Java test frameworks
Apache License 2.0
355 stars 224 forks source link

Lazy load logger in ResultUtils to supress SLF4J warings in AnnotationProcessing #968

Closed rPraml closed 10 months ago

rPraml commented 11 months ago

Context

The JavaDocDescriptionsProcessor requires the ResultsUtils.generateMethodSignatureHash When the ResultsUtils class is loaded during AnnotationProcessing, it has initialized also the SLF4J framework, which leads to some SLF4J warnings while compiling.

Getting the logger only, when it is really needed will solve the issue (in theoretical more costs in performance, but this does not matter here)

See #962 for more info

Checklist

rPraml commented 11 months ago

@baev maybe you can provide feedback to this change

baev commented 10 months ago

fixed via https://github.com/allure-framework/allure-java/pull/981

baev commented 10 months ago

Thanks for the contribution!