YARN-11734. Fix spotbugs in ServiceScheduler#load (#7088) Contributed by Hualong Zhang.

Reviewed-by: Shilun Fan <slfan1989@apache.org>
Signed-off-by: Shilun Fan <slfan1989@apache.org>
This commit is contained in:
zhtttylz 2024-10-03 06:15:17 +08:00 committed by GitHub
parent 3f637efaa2
commit b781882020
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 8 deletions

View File

@ -726,12 +726,4 @@
<Package name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.placement.schema" /> <Package name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.placement.schema" />
</Match> </Match>
<!-- The ServiceScheduler#createConfigFileCache method uses the `load` method,
which is not allowed to return null; we can ignore it here. -->
<Match>
<Class name="org.apache.hadoop.yarn.service.ServiceScheduler"/>
<Method name="$1.load(ConfigFile)" />
<Bug pattern="NP_NONNULL_RETURN_VIOLATION"/>
</Match>
</FindBugsFilter> </FindBugsFilter>

View File

@ -56,4 +56,9 @@
</Or> </Or>
<Bug pattern="SE_BAD_FIELD" /> <Bug pattern="SE_BAD_FIELD" />
</Match> </Match>
<Match>
<Class name="org.apache.hadoop.yarn.service.ServiceScheduler$1"/>
<Method name="load"/>
<Bug code="NP" pattern="NP_NONNULL_RETURN_VIOLATION"/>
</Match>
</FindBugsFilter> </FindBugsFilter>