<FindBugsFilter>

     <Match>
       <Bug pattern="NP_BOOLEAN_RETURN_NULL"/>
     </Match>

     <!-- InputStreamGraph uses this without side effects -->
     <Match>
       <Class name="org.switchyard.internal.io.graph.InputStreamGraph" />
       <Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" />
     </Match>

     <!-- ignore the generated logger/bundle classes generated by the log tool. -->
     <!-- see https://issues.jboss.org/browse/LOGTOOL-81 -->
     <Match>
        <Or>
           <Class name="~.*\_\$+logger"/>
           <Class name="~.*\_\$+bundle"/>
        </Or>
        <Bug pattern="NM_CLASS_NAMING_CONVENTION"/>
     </Match>

     <!-- Throwing an exception on null, findbugs doesn't realize it -->
     <Match>
         <Class name="org.switchyard.transform.internal.TransformerRegistryLoader"/>
         <Method name="getTransformerFactory"/>
         <Bug pattern="NP_NULL_ON_SOME_PATH"/>
     </Match>

     <Match>
        <Class name="org.switchyard.standalone.SwitchYard"/>
        <Bug pattern="WA_NOT_IN_LOOP"/>
     </Match>

     <!-- Occurs in test, okay to test for null here -->
     <Match>
	 <Or>
	     <Class name="org.switchyard.component.camel.switchyard.SwitchYardProducer"/>
             <Class name="org.switchyard.test.SwitchYardRunner"/>
	 </Or>
         <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
     </Match>

     <!-- SWITCHYARD-1901 -->
     <Match>
        <Bug pattern="IS2_INCONSISTENT_SYNC"/>
     </Match>
     
     <!-- SWITCHYARD-1903 -->
     <Match>
         <Bug pattern="DM_DEFAULT_ENCODING"/>
     </Match>
     
     <!-- Give an exception to explicit garbage collection because of -->
     <!-- SWITCHYARD-874 -->
     <Match> 
         <Class name="org.switchyard.component.test.mixins.jca.SwitchYardIronJacamarHandler"/>
         <Method name="startup"/>
         <Bug pattern="DM_GC"/>
     </Match>

     <!-- SWITCHYARD-1887 --> 
     <Match>
        <Or>
            <Bug pattern="EI_EXPOSE_REP"/>
            <Bug pattern="EI_EXPOSE_REP2"/>
        </Or>
     </Match>

     <!-- Findbugs not taking into account other methods of class -->
     <Match>
        <Or>
            <Class name="org.switchyard.component.camel.model.RouteScanner$RouteFilter"/>
            <Class name="org.switchyard.transform.config.model.TransformSwitchYardScanner$TransformerInstanceOfFilter"/>
            <Class name="org.switchyard.transform.xslt.internal.XsltTransformFactory$XsltTransformFactoryErrorListener"/>
            <Class name="org.switchyard.validate.config.model.ValidateSwitchYardScanner$ValidatorInstanceOfFilter"/>
            <Class name="org.switchyard.validate.xml.internal.XmlValidator$XmlValidatorLSInput"/>
            <Class name="org.switchyard.component.rules.exchange.RulesExchangeHandler$FireUntilHalt"/>
            <Class name="org.switchyard.validate.xml.internal.XmlValidator"/>
            <Class name="org.switchyard.validate.config.model.ValidateSwitchYardScanner"/>
            <Package name="org.switchyard.deploy.osgi.internal"/>
	    <Package name="org.switchyard.deploy.osgi.base"/>
        </Or>
        <Bug pattern="SIC_INNER_SHOULD_BE_STATIC"/>
     </Match>

     <Match>
         <Class name="org.switchyard.common.version.Queries$Projects"/>
         <Bug pattern="MS_PKGPROTECT"/>
     </Match>
     
     <!-- SWITCHYARD-1902 -->
     <!-- Should we be creating ClassLoaders inside doPrivileged blocks?
	  Not sure what WildFly is doing here, we should do the same -->
     <Match>
         <Bug pattern="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"/>
     </Match>
      
     <!-- SWITCHYARD-1895 -->
     <!-- Changing the name of the class may be changing public API - adding
          a task and an exception for now 				-->
     <Match>
        <Class name="org.switchyard.security.principal.Group"/>	
        <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE"/>
     </Match>
	
     <!-- Logged SWITCHYARD-1894 -->
     <Match>
        <Class name="org.switchyard.security.credential.AssertionCredential"/>
        <Bug pattern="SE_BAD_FIELD"/>
     </Match>

     <!-- SWITCHYARD-1898 -->
     <!-- Investigate non-transient/non-serializable instance fields in
	  Serializable class --> 
     <Match>
         <Class name="org.switchyard.component.bean.deploy.CDIBeanServiceDescriptor"/>
         <Bug pattern="SE_BAD_FIELD"/>
     </Match>

     <!-- SWITCHYARD-1899 -->
     <!-- Investigate non-transient/non-serializable instance fields in
          Serializable class --> 
     <Match>
       <Class name="org.switchyard.component.test.mixins.jca.MockConnectionFactory"/>
       <Bug pattern="SE_BAD_FIELD"/>
     </Match>

     <!-- Investigate non-transient/non-serializable instance fields in
          Serializable class -->
     <Match>
       <Class name="org.switchyard.component.sca.SwitchYardRemotingServlet"/>
       <Bug pattern="SE_BAD_FIELD"/>
     </Match>

     <Match>
       <Class name="org.switchyard.component.soap.composer.SOAPFaultInfo"/>
       <Bug pattern="SE_BAD_FIELD"/> 
     </Match>

     <!-- In this instance, findbugs is just plain wrong.   It complains that
          Exception is not thrown within the try/catch, but it is clearly thrown
          by MessageComposer.compose().  --> 
     <Match>
       <Class name="org.switchyard.component.http.OutboundHandler"/>
       <Bug pattern="REC_CATCH_EXCEPTION"/>
     </Match>

     <!-- In this instance findbugs, is wrong also - there are multiple accesses
          so the AtomicInteger needs to be synchronized. -->
     <Match>
        <Or>
	  <Package name="org.switchyard.deploy.osgi.internal"/>
	  <Package name="org.switchyard.deploy.osgi.base"/>
          <Class name="org.switchyard.remote.cluster.RoundRobinStrategy"/>
        </Or>
        <Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/>
     </Match>

     <Match>
       <Class name="org.switchyard.component.soap.AddressingInterceptor"/>
       <Bug pattern="NP_ALWAYS_NULL"/>
     </Match>

     <Match>
       <Class name="org.switchyard.component.soap.composer.SOAPMessageComposer"/>
       <Bug pattern="REC_CATCH_EXCEPTION"/>
     </Match>

     <Match>
       <Class name="org.switchyard.component.bpel.deploy.BPELComponent"/>
       <Bug pattern="LI_LAZY_INIT_STATIC"/>
     </Match>

     <Match>
       <Package name="org.switchyard.deploy.osgi.internal"/>
       <Bug pattern="DMI_BLOCKING_METHODS_ON_URL"/>
     </Match>

     <Match>
       <Package name="org.switchyard.deploy.osgi.internal"/>
       <Bug pattern="WMI_WRONG_MAP_ITERATOR"/>
     </Match>

</FindBugsFilter>
