FindBugs Report

Project Information

Project: Apache Hadoop YARN Server Common

FindBugs version: 3.0.0

Code analyzed:



Metrics

14750 lines of code analyzed, in 212 classes, in 19 packages.

Metric Total Density*
High Priority Warnings 0.00
Medium Priority Warnings 7 0.47
Total Warnings 7 0.47

(* Defects per Thousand lines of non-commenting source statements)



Contents

Summary

Warning Type Number
Correctness Warnings 3
Multithreaded correctness Warnings 3
Dodgy code Warnings 1
Total 7

Warnings

Click on a warning row to see full context information.

Correctness Warnings

Code Warning
NP Possible null pointer dereference of appAttemptReports in org.apache.hadoop.yarn.server.webapp.WebServices.getAppAttempts(HttpServletRequest, HttpServletResponse, String) on exception path
NP Possible null pointer dereference of appReports in org.apache.hadoop.yarn.server.webapp.WebServices.getApps(HttpServletRequest, HttpServletResponse, String, Set, String, String, String, String, String, String, String, String, Set) on exception path
NP Possible null pointer dereference of containerReports in org.apache.hadoop.yarn.server.webapp.WebServices.getContainers(HttpServletRequest, HttpServletResponse, String, String) on exception path

Multithreaded correctness Warnings

Code Warning
IS Inconsistent synchronization of org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.builder; locked 76% of time
IS Inconsistent synchronization of org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.proto; locked 83% of time
IS Inconsistent synchronization of org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.viaProto; locked 84% of time

Dodgy code Warnings

Code Warning
DB org.apache.hadoop.yarn.server.webapp.WebPageUtils.getAppsTableColumnDefs(boolean, boolean) uses the same code for two branches

Details

DB_DUPLICATE_BRANCHES: Method uses the same code for two branches

This method uses the same code to implement two branches of a conditional branch. Check to ensure that this isn't a coding mistake.

IS2_INCONSISTENT_SYNC: Inconsistent synchronization

The fields of this class appear to be accessed inconsistently with respect to synchronization.  This bug report indicates that the bug pattern detector judged that

A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.

You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.

Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held.  Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.

NP_NULL_ON_SOME_PATH_EXCEPTION: Possible null pointer dereference in method on exception path

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  Note that because FindBugs currently does not prune infeasible exception paths, this may be a false warning.

Also note that FindBugs considers the default case of a switch statement to be an exception path, since the default case is often infeasible.