Disable SE_PREVENT_EXT_OBJ_OVERWRITE 85/109185/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 7 Dec 2023 05:19:36 +0000 (06:19 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 7 Dec 2023 05:19:36 +0000 (06:19 +0100)
SE_PREVENT_EXT_OBJ_OVERWRITE reports a ton of warnings and its heuristic
is quite feeble, forcing a very particular code pattern.

Do not report this issue, as it cannot be fixed in a non-intrusive way.

Change-Id: I3aa71831c3e4eee8bf06bca2ca4eb1ad4a141af9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
spotbugs/src/main/resources/spotbugs-exclude.xml

index 836893c1c4d25b6e1f144ac13fb8db63e3f20750..a55185c8a64c2f3f1abaf602266d85151658c5d4 100644 (file)
       <Bug pattern="EI_EXPOSE_REP"/>
       <Bug pattern="EI_EXPOSE_REP2"/>
       <Bug pattern="MS_EXPOSE_REP"/>
+
+      <!--
+           https://github.com/spotbugs/spotbugs/issues/2750. The heuristic in this check does not work quite a few
+           cases, such as null guards (which we would use in serialization proxies) and plain if() without an else,
+           such as if(foo != null) { throw new ISE() }.
+      -->
+      <Bug pattern="SE_PREVENT_EXT_OBJ_OVERWRITE"/>
     </Or>
   </Match>
 </FindBugsFilter>