<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
    <Match>
        <!-- spotbugs message is Public method de.accso.flexinale.common.shared_kernel.EventClassHelper.getEventClazzVersion(Class)
        uses reflection to create a class it gets in its parameter which could increase the accessibility of any class. -->
        <Class name="de.accso.flexinale.common.shared_kernel.EventClassHelper" />
        <Bug pattern="REFLC_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_CLASS" />
    </Match>
    <Match>
        <!-- spotbugs message is High: record must be non-null but is marked as nullable  -->
        <Class name="de.accso.flexinale.common.infrastructure.eventbus.KafkaConsumerErrorHandler" />
        <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
    </Match>
    <Match>
        <!-- spotbugs message is High: record must be non-null but is marked as nullable  -->
        <Class name="de.accso.flexinale.common.api.event.EventContext" />
        <Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
    </Match>
    <Match>
        <!-- spotbugs message is Medium: may expose internal representation by returning
        InMemorySyncEventBus.eventContextHolder -->
        <Class name="de.accso.flexinale.common.infrastructure.eventbus.InMemorySyncEventBus" />
        <Bug pattern="EI_EXPOSE_REP" />
    </Match>
    <Match>
        <!-- spotbugs message is Medium: may expose internal representation by returning
        InMemorySyncEventBus.eventContextHolder -->
        <Class name="de.accso.flexinale.common.infrastructure.eventbus.KafkaAsyncEventBus" />
        <Bug pattern="EI_EXPOSE_REP" />
    </Match>
    <Match>
        <!-- spotbugs message is Medium: may expose internal representation by returning
        InMemorySyncEventBus.eventContextHolder -->
        <Class name="de.accso.flexinale.common.infrastructure.eventbus.NopeEventBusSpy" />
        <Bug pattern="EI_EXPOSE_REP" />
    </Match>
    <Match>
        <Class name="de.accso.flexinale.common.infrastructure.FlexinaleSpringConfig" />
        <Bug pattern="CT_CONSTRUCTOR_THROW"/>
    </Match>
    <Match>
        <Class name="de.accso.flexinale.common.infrastructure.eventbus.EventSubscriberReceiveDispatcher" />
        <Bug pattern="DCN_NULLPOINTER_EXCEPTION"/>
    </Match>
    <Match>
        <Class name="de.accso.flexinale.common.shared_kernel.Selection$RandomSelector" />
        <Bug pattern="PREDICTABLE_RANDOM"/>
    </Match>
</FindBugsFilter>