Files
ofbiz-framework/spotbugs/exclude.xml
T
Jacques Le Roux b9735b208a Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Finally it's better to use || than | (did not check well last time) in
ProductSearchSession::makeSearchParametersString
kc.isAnyPrefix() || kc.isAnySuffix()
So also removes the exclusion

No problem for report field in AbstractReportThread as explained in exclude.xml
2021-12-16 13:09:38 +01:00

141 lines
5.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<!-- v v CN_IDIOM_NO_SUPER_CALL = clone method does not call supper.clone(). OK since shallow clone wanted-->
<Match>
<Class name="org.apache.ofbiz.entity.GenericEntity" />
<Method name="clone" />
<Bug pattern="CN_IDIOM_NO_SUPER_CALL" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.GenericPK" />
<Method name="clone" />
<Bug pattern="CN_IDIOM_NO_SUPER_CALL" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.GenericValue" />
<Method name="clone" />
<Bug pattern="CN_IDIOM_NO_SUPER_CALL" />
</Match>
<!-- ^ ^ CN_IDIOM_NO_SUPER_CALL = clone method does not call supper.clone(). OK since shallow clone wanted-->
<!-- v v OK because of synchronized use -->
<Match>
<Class name="org.apache.ofbiz.webapp.view.ApacheFopWorker" />
<Method name="getFactoryInstance" />
<Bug pattern="DC_DOUBLECHECK" />
</Match>
<Match>
<Class name="org.apache.ofbiz.accounting.thirdparty.valuelink.ValueLinkApi" />
<Method name="getWorkingKeyIndex" />
<Bug pattern="DC_DOUBLECHECK" />
</Match>
<!-- ^ ^ OK because of synchronized use -->
<!-- v v OK see remark about OWASP advice at bottom of OFBIZ-9973 -->
<Match>
<Class name="org.apache.ofbiz.pricat.PricatParseExcelHtmlThread" />
<Method name="storePricatFile" />
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
</Match>
<Match>
<Class name="org.apache.ofbiz.security.SecuredUpload" />
<Method name="isValidFile" />
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
</Match>
<!-- ^ ^ OK see remark about OWASP advice at bottom of OFBIZ-9973 -->
<!-- v v OK all is internal -->
<!-- Though asmentioned by SpotBugs: "a PreparedStatement, is more efficient" -->
<Match>
<Class name="org.apache.ofbiz.entity.util.SequenceUtil" />
<Method name="SequenceBank" />
<Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.jdbc.DatabaseUtil" />
<Method name="createTable" />
<Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.util.SequenceUtil$SequenceBank" />
<Method name="fillBank" />
<Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" />
</Match>
<!-- ^ ^ OK all is internal -->
<!-- v v OK all is internal (as long as not proved otherwise...)-->
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="partialSelect"/>
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="select" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="selectByMultiRelation" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="selectCountByCondition" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="selectListIteratorByCondition" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="singleInsert" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="customUpdate" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="updateByCondition" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<Match>
<Class name="org.apache.ofbiz.entity.datasource.GenericDAO" />
<Method name="singleUpdate" />
<Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
</Match>
<!-- ^ ^ OK all is internal (as long as not proved otherwise...)-->
<!-- v v not a problem, false positive -->
<Match>
<!-- It's OK, cf. OFBIZ-9973 -->
<Class name="org.apache.ofbiz.product.imagemanagement.FrameImage" />
<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>
<Match>
<!-- not a problem report is initialised by initHtmlReport and then feed by different threads -->
<Class name="org.apache.ofbiz.htmlreport.AbstractReportThread" />
<Field name="report" />
<Bug pattern="UWF_UNWRITTEN_FIELD " />
</Match>
<!-- ^ ^ not a problem, false positive -->
</FindBugsFilter>