SpotBugs Report

Project Information

Project: MicrosoftStreetside (spotbugsTest)

SpotBugs version: 4.0.3

Code analyzed:



Metrics

884 lines of code analyzed, in 25 classes, in 9 packages.

Metric Total Density*
High Priority Warnings 0.00
Medium Priority Warnings 6 6.79
Low Priority Warnings 3 3.39
Total Warnings 9 10.18

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



Contents

Summary

Warning Type Number
Bad practice Warnings 1
Malicious code vulnerability Warnings 1
Performance Warnings 1
Dodgy code Warnings 6
Total 9

Warnings

Click on a warning row to see full context information.

Bad practice Warnings

Code Warning
UI Usage of GetResource in org.openstreetmap.josm.plugins.streetside.utils.api.JsonSequencesDecoderTest.testDecodeSequences() may be unsafe if class is extended

Malicious code vulnerability Warnings

Code Warning
DP Invocation of reflect.Field.setAccessible(boolean), which should be invoked from within a doPrivileged block, in org.openstreetmap.josm.plugins.streetside.utils.TestUtil.getAccessibleField(Class, String)

Performance Warnings

Code Warning
UPM Private method org.openstreetmap.josm.plugins.streetside.utils.StreetsideURLTest.assertUrlEquals(URL, String, String[]) is never called

Dodgy code Warnings

Code Warning
UrF Unread public/protected field: org.openstreetmap.josm.plugins.streetside.StreetsideLayerTest.rules
UrF Unread public/protected field: org.openstreetmap.josm.plugins.streetside.cache.StreetsideCacheTest.rules
UrF Unread public/protected field: org.openstreetmap.josm.plugins.streetside.gui.ImageDisplayTest.rules
UrF Unread public/protected field: org.openstreetmap.josm.plugins.streetside.gui.StreetsidePreferenceSettingTest.rules
UrF Unread public/protected field: org.openstreetmap.josm.plugins.streetside.history.StreetsideRecordTest.rules
UrF Unread public/protected field: org.openstreetmap.josm.plugins.streetside.utils.StreetsidePropertiesTest.rules

Details

DP_DO_INSIDE_DO_PRIVILEGED: Method invoked that should be only be invoked inside a doPrivileged block

This code invokes a method that requires a security permission check. If this code will be granted security permissions, but might be invoked by code that does not have security permissions, then the invocation needs to occur inside a doPrivileged block.

UI_INHERITANCE_UNSAFE_GETRESOURCE: Usage of GetResource may be unsafe if class is extended

Calling this.getClass().getResource(...) could give results other than expected if this class is extended by a class in another package.

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.

URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD: Unread public/protected field

This field is never read.  The field is public or protected, so perhaps it is intended to be used with classes not seen as part of the analysis. If not, consider removing it from the class.