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 4724b9e Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
4724b9e is described below
commit 4724b9e2ee39527b847b006919b544d48c03907a
Author: Jacques Le Roux <[email protected]>
AuthorDate: Mon Dec 13 16:22:19 2021 +0100
Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
We don't fear collisions for "url". It's only used in testXmlRpcRequest
during
a sole test, write that in exclude.xml
Also removes an unused MODULE in XmlRpcTests class
---
.../src/main/java/org/apache/ofbiz/service/test/XmlRpcTests.java | 1 -
spotbugs/exclude.xml | 9 ++++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/framework/service/src/main/java/org/apache/ofbiz/service/test/XmlRpcTests.java
b/framework/service/src/main/java/org/apache/ofbiz/service/test/XmlRpcTests.java
index 44f3ddc..0e500fd 100644
---
a/framework/service/src/main/java/org/apache/ofbiz/service/test/XmlRpcTests.java
+++
b/framework/service/src/main/java/org/apache/ofbiz/service/test/XmlRpcTests.java
@@ -36,7 +36,6 @@ import org.apache.xmlrpc.client.XmlRpcClient;
*/
public class XmlRpcTests extends AbstractXmlRpcTestCase {
- private static final String MODULE = XmlRpcTests.class.getName();
private static final String RESOURCE = "ServiceErrorUiLabels";
private static String url =
"http://localhost:8080/webtools/control/xmlrpc?USERNAME=admin&PASSWORD=ofbiz";
diff --git a/spotbugs/exclude.xml b/spotbugs/exclude.xml
index c4b710e..5146377 100644
--- a/spotbugs/exclude.xml
+++ b/spotbugs/exclude.xml
@@ -128,8 +128,11 @@
<Method name="previewFrameImage" />
<Bug pattern="PT_RELATIVE_PATH_TRAVERSAL" />
</Match>
+ <Match>
+ <!-- not a problem this is used only once during test, no possible
collisions -->
+ <Class name="org.apache.ofbiz.service.test" />
+ <Method name="XmlRpcTests" />
+ <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+ </Match>
<!-- ^ ^ not a problem, false positive -->
-
-
-
</FindBugsFilter>