Browse Source

YARN-7764. Findbugs warning: Resource#getResources may expose internal representation. Contributed by Weiwei Yang.

(cherry picked from commit f7a17b029ddd61ca73c2c2c88f5451dbf05fc501)
Sunil G 7 years ago
parent
commit
1a125dd92f
1 changed files with 7 additions and 0 deletions
  1. 7 0
      hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml

+ 7 - 0
hadoop-yarn-project/hadoop-yarn/dev-support/findbugs-exclude.xml

@@ -658,4 +658,11 @@
     <Bug pattern="NP_NULL_ON_SOME_PATH" />
   </Match>
 
+  <!-- Expose the reference to avoid performance overhead -->
+  <Match>
+    <Class name="org.apache.hadoop.yarn.api.records.Resource" />
+    <Method name="getResources" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+
 </FindBugsFilter>