FindBugs Report

Project Information

Project:

FindBugs version: 3.0.1

Code analyzed:



Metrics

828 lines of code analyzed, in 32 classes, in 7 packages.

Metric Total Density*
High Priority Warnings 0.00
Medium Priority Warnings 6 7.25
Low Priority Warnings 3 3.62
Total Warnings 9 10.87

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



Contents

Summary

Warning Type Number
Malicious code vulnerability Warnings 1
Performance Warnings 1
Dodgy code Warnings 7
Total 9

Warnings

Click on a warning row to see full context information.

Malicious code vulnerability Warnings

Code Warning
EI au.com.mountainpass.hyperstate.core.Relationship.getNature() may expose internal representation by returning Relationship.natures

Performance Warnings

Code Warning
UPM Private method au.com.mountainpass.hyperstate.core.entities.EntityWrapper.getEntitiesAndJoin() is never called

Dodgy code Warnings

Code Warning
DB new au.com.mountainpass.hyperstate.core.entities.EntityWrapper(String, Object, String, String[]) uses the same code for two switch clauses
DLS Dead store to code in au.com.mountainpass.hyperstate.core.Labelled.interpolate(String, String[])
DLS Dead store to requestMapping in au.com.mountainpass.hyperstate.server.HyperstateController.getEntity(String)
DLS Dead store to url in au.com.mountainpass.hyperstate.server.HyperstateRootController.post(MultiValueMap, HttpServletRequest)
DLS Dead store to url in au.com.mountainpass.hyperstate.server.HyperstateRootController.put(MultiValueMap, HttpServletRequest)
SF Switch statement found in new au.com.mountainpass.hyperstate.core.entities.EntityWrapper(String, Object, String, String[]) where one case falls through to the next case
SF Switch statement found in new au.com.mountainpass.hyperstate.core.entities.EntityWrapper(String, Object, String, String[]) where default case is missing

Details

DB_DUPLICATE_SWITCH_CLAUSES: Method uses the same code for two switch clauses

This method uses the same code to implement two clauses of a switch statement. This could be a case of duplicate code, but it might also indicate a coding mistake.

DLS_DEAD_LOCAL_STORE: Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

EI_EXPOSE_REP: May expose internal representation by returning reference to mutable object

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

SF_SWITCH_NO_DEFAULT: Switch statement found where default case is missing

This method contains a switch statement where default case is missing. Usually you need to provide a default case.

Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if the default case is at the end of the switch statement and the switch statement doesn't contain break statements for other cases.

SF_SWITCH_FALLTHROUGH: Switch statement found where one case falls through to the next case

This method contains a switch statement where one case branch will fall through to the next case. Usually you need to end this case with a break or return.

UPM_UNCALLED_PRIVATE_METHOD: Private method is never called

This private method is never called. Although it is possible that the method will be invoked through reflection, it is more likely that the method is never used, and should be removed.