This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new 8587bcc Improved: Fix some bugs Spotbugs reports (OFBIZ-12386) 8587bcc is described below commit 8587bccf40e109c3652d2c6c327c5d20bf45c2bb Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Thu Dec 23 17:14:11 2021 +0100 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386) We don't fear collisions for "servletContext". It's only initialised by contextInitialized() and then only read before being destroyed by contextDestroyed() Also initialises servletContextto null --- spotbugs/exclude.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spotbugs/exclude.xml b/spotbugs/exclude.xml index dab253e..7fe11bd 100644 --- a/spotbugs/exclude.xml +++ b/spotbugs/exclude.xml @@ -137,5 +137,11 @@ <Field name="report" /> <Bug pattern="UWF_UNWRITTEN_FIELD " /> </Match> + <Match> + <!-- not a problem servletContext is initialised by contextInitialized() and then only read before being destroyed by contextDestroyed() --> + <Class name="org.apache.ofbiz.ws.rs.listener.ApiContextListener" /> + <Field name="servletContext" /> + <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD " /> + </Match> <!-- ^ ^ not a problem, false positive --> </FindBugsFilter>