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
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user