<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->

<FindBugsFilter>
  <Match>
    <!-- 
        Findbugs is complaining that access to the field "managers"
        is inconsistently synchronized.
        From code reading this seems ok, only writes are synchronized.
    -->
    <Class name="org.apache.torque.TorqueInstance" />
    <Bug pattern="IS2_INCONSISTENT_SYNC" />
  </Match>
  <Match>
    <!-- 
        Criterion may hold a reference to an array which is modifiable from
        outside.
        This does not seem to be problematic if the array only lives in 
        one thread. 
    -->
    <Class name="org.apache.torque.criteria.Criterion" />
    <Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" />
  </Match>
  <Match>
    <!-- 
        ComboKey may hold a reference to an array which is modifiable from
        outside.
        This does not seem to be problematic if the array only lives in 
        one thread. 
    -->
    <Class name="org.apache.torque.om.ComboKey" />
    <Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" />
  </Match>
  <Match>
    <!-- 
        WhereClauseExpression may hold a reference to an array
        which is modifiable from outside.
        This does not seem to be problematic if the array only lives in 
        one thread. 
    -->
    <Class name="org.apache.torque.sql.WhereClauseExpression" />
    <Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" />
  </Match>
  <Match>
    <!-- 
        It is ok that BasePeerImpl generates SQL statements
        from nonconstant strings. 
    -->
    <Class name="org.apache.torque.util.BasePeerImpl" />
    <Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" />
  </Match>
  <Match>
    <!-- 
        Do not report improvements for old Criteria.Criterion class
    -->
    <Class name="org.apache.torque.util.Criteria$Criterion" />
    <Bug pattern=" SE_INNER_CLASS,SIC_INNER_SHOULD_BE_STATIC" />
  </Match>
  <Match>
    <!-- 
        Reported synchronization bug for field lastResults
        seems to come from invalidateResult method.
        I cannot see any problems caused by that.
    -->
    <Class name="org.apache.torque.util.LargeSelect" />
    <Bug pattern="IS2_INCONSISTENT_SYNC" />
    <Field name="lastResults"/>
  </Match>
</FindBugsFilter>