FindBugs Bug Detector Report

The following document contains the results of FindBugs Report

FindBugs Version is 1.3.2

Threshold is Low

Effort is Max

Summary

Classes Bugs Errors Missing Classes
277 69 0 0

com.gridsystems.resource.ResourcePlugin

Bug Category Details Line
Exception is caught when Exception is not thrown in com.gridsystems.resource.ResourcePlugin.startup(KernelEvent) STYLE REC_CATCH_EXCEPTION 159

com.gridsystems.resource.ResourcePlugin$DirectoryInitAction

Bug Category Details Line
Unchecked/unconfirmed cast from java.rmi.RemoteException to com.gridsystems.innergrid.kernel.KernelException in com.gridsystems.resource.ResourcePlugin$DirectoryInitAction.perform() STYLE BC_UNCONFIRMED_CAST 357

com.gridsystems.resource.api.CPUId

Bug Category Details Line
Comparison of String parameter using == or != in com.gridsystems.resource.api.CPUId.eq(String, String) BAD_PRACTICE ES_COMPARING_PARAMETER_STRING_WITH_EQ 133

com.gridsystems.resource.api.Group

Bug Category Details Line
com.gridsystems.resource.api.Group.getLabourHours() may expose internal representation by returning Group.labourHours MALICIOUS_CODE EI_EXPOSE_REP 249
com.gridsystems.resource.api.Group.getResources() may expose internal representation by returning Group.resources MALICIOUS_CODE EI_EXPOSE_REP 240
com.gridsystems.resource.api.Group.setLabourHours(TimeInterval[]) may expose internal representation by storing an externally mutable object into Group.labourHours MALICIOUS_CODE EI_EXPOSE_REP2 265
com.gridsystems.resource.api.Group.setResources(ResourceId[]) may expose internal representation by storing an externally mutable object into Group.resources MALICIOUS_CODE EI_EXPOSE_REP2 231

com.gridsystems.resource.api.OS

Bug Category Details Line
Comparison of String parameter using == or != in com.gridsystems.resource.api.OS.eq(String, String) BAD_PRACTICE ES_COMPARING_PARAMETER_STRING_WITH_EQ 172

com.gridsystems.resource.api.ResourceAssignment

Bug Category Details Line
Comparison of String parameter using == or != in com.gridsystems.resource.api.ResourceAssignment.eq(String, String) BAD_PRACTICE ES_COMPARING_PARAMETER_STRING_WITH_EQ 104

com.gridsystems.resource.api.ResourceId

Bug Category Details Line
ResourceId.resourceName not initialized in constructor STYLE UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR Not available
ResourceId.resourceType not initialized in constructor STYLE UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR Not available

com.gridsystems.resource.api.ResourceProperties

Bug Category Details Line
com.gridsystems.resource.api.ResourceProperties.getCpus() may expose internal representation by returning ResourceProperties.cpu MALICIOUS_CODE EI_EXPOSE_REP 477
com.gridsystems.resource.api.ResourceProperties.getGroups() may expose internal representation by returning ResourceProperties.groups MALICIOUS_CODE EI_EXPOSE_REP 347
com.gridsystems.resource.api.ResourceProperties.getKeywords() may expose internal representation by returning ResourceProperties.keywords MALICIOUS_CODE EI_EXPOSE_REP 430
com.gridsystems.resource.api.ResourceProperties.getOss() may expose internal representation by returning ResourceProperties.oss MALICIOUS_CODE EI_EXPOSE_REP 572
com.gridsystems.resource.api.ResourceProperties.getSecurityLevels() may expose internal representation by returning ResourceProperties.securityLevels MALICIOUS_CODE EI_EXPOSE_REP 732
com.gridsystems.resource.api.ResourceProperties.getSupportedParameterTypes() may expose internal representation by returning ResourceProperties.supportedParameterTypes MALICIOUS_CODE EI_EXPOSE_REP 627
com.gridsystems.resource.api.ResourceProperties.getSupportedRangeTypes() may expose internal representation by returning ResourceProperties.supportedRangeTypes MALICIOUS_CODE EI_EXPOSE_REP 645
com.gridsystems.resource.api.ResourceProperties.getSupportedResultFilterPolicies() may expose internal representation by returning ResourceProperties.supportedResultFilterPolicies MALICIOUS_CODE EI_EXPOSE_REP 679
com.gridsystems.resource.api.ResourceProperties.setCpus(CPU[]) may expose internal representation by storing an externally mutable object into ResourceProperties.cpu MALICIOUS_CODE EI_EXPOSE_REP2 486
com.gridsystems.resource.api.ResourceProperties.setGroups(String[]) may expose internal representation by storing an externally mutable object into ResourceProperties.groups MALICIOUS_CODE EI_EXPOSE_REP2 357
com.gridsystems.resource.api.ResourceProperties.setKeywords(String[]) may expose internal representation by storing an externally mutable object into ResourceProperties.keywords MALICIOUS_CODE EI_EXPOSE_REP2 447
com.gridsystems.resource.api.ResourceProperties.setOss(OS[]) may expose internal representation by storing an externally mutable object into ResourceProperties.oss MALICIOUS_CODE EI_EXPOSE_REP2 581
com.gridsystems.resource.api.ResourceProperties.setSecurityLevels(String[]) may expose internal representation by storing an externally mutable object into ResourceProperties.securityLevels MALICIOUS_CODE EI_EXPOSE_REP2 739
com.gridsystems.resource.api.ResourceProperties.setSupportedParameterTypes(String[]) may expose internal representation by storing an externally mutable object into ResourceProperties.supportedParameterTypes MALICIOUS_CODE EI_EXPOSE_REP2 636
com.gridsystems.resource.api.ResourceProperties.setSupportedRangeTypes(String[]) may expose internal representation by storing an externally mutable object into ResourceProperties.supportedRangeTypes MALICIOUS_CODE EI_EXPOSE_REP2 654
com.gridsystems.resource.api.ResourceProperties.setSupportedResultFilterPolicies(String[]) may expose internal representation by storing an externally mutable object into ResourceProperties.supportedResultFilterPolicies MALICIOUS_CODE EI_EXPOSE_REP2 686
com.gridsystems.resource.api.ResourceProperties.ALL_STATES is a mutable array MALICIOUS_CODE MS_MUTABLE_ARRAY 66
com.gridsystems.resource.api.ResourceProperties.ALL_SECURITYLEVELS should be package protected MALICIOUS_CODE MS_PKGPROTECT 104

com.gridsystems.resource.api.ResourceUsage

Bug Category Details Line
com.gridsystems.resource.api.ResourceUsage.getAssignments() may expose internal representation by returning ResourceUsage.assignments MALICIOUS_CODE EI_EXPOSE_REP 49
com.gridsystems.resource.api.ResourceUsage.setAssignments(ResourceAssignment[]) may expose internal representation by storing an externally mutable object into ResourceUsage.assignments MALICIOUS_CODE EI_EXPOSE_REP2 68

com.gridsystems.resource.events.GroupEvent

Bug Category Details Line
com.gridsystems.resource.events.GroupEvent.getAffectedResources() may expose internal representation by returning GroupEvent.affectedResources MALICIOUS_CODE EI_EXPOSE_REP 163
new com.gridsystems.resource.events.GroupEvent(int, String, ResourceId[]) may expose internal representation by storing an externally mutable object into GroupEvent.affectedResources MALICIOUS_CODE EI_EXPOSE_REP2 136

com.gridsystems.resource.internal.ApiResourceGroupImpl

Bug Category Details Line
Class com.gridsystems.resource.internal.ApiResourceGroupImpl is final but declares protected field com.gridsystems.resource.internal.ApiResourceGroupImpl.MS_IN_DAY STYLE CI_CONFUSED_INHERITANCE Not available
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ApiResourceGroupImpl.addResourcesToGroup(ResourceId[], String, boolean) STYLE REC_CATCH_EXCEPTION 252
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ApiResourceGroupImpl.getAllGroups(String) STYLE REC_CATCH_EXCEPTION 197
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ApiResourceGroupImpl.getGroup(String) STYLE REC_CATCH_EXCEPTION 159
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ApiResourceGroupImpl.removeResourcesFromGroup(ResourceId[], String) STYLE REC_CATCH_EXCEPTION 341

com.gridsystems.resource.internal.ApiResourceManagerImpl

Bug Category Details Line
Redundant nullcheck of assignments, which is known to be non-null in com.gridsystems.resource.internal.ApiResourceManagerImpl.removeAssignments(ResourceHolder, ResourceAssignment, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE 361
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ApiResourceManagerImpl.addResource(Resource) STYLE REC_CATCH_EXCEPTION 93

com.gridsystems.resource.internal.ApiResourceQueryImpl

Bug Category Details Line
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ApiResourceQueryImpl.getAllResources(String) STYLE REC_CATCH_EXCEPTION 194
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ApiResourceQueryImpl.getAllResourcesRecursive(String) STYLE REC_CATCH_EXCEPTION 157

com.gridsystems.resource.internal.ApiResourceQueryImpl$ResourceComparator

Bug Category Details Line
com.gridsystems.resource.internal.ApiResourceQueryImpl$ResourceComparator implements Comparator but not Serializable BAD_PRACTICE SE_COMPARATOR_SHOULD_BE_SERIALIZABLE 403-416

com.gridsystems.resource.internal.FilterManagers$DefaultFilterManager

Bug Category Details Line
Dead store to hundred in com.gridsystems.resource.internal.FilterManagers$DefaultFilterManager.getAvailableMflopsByFilters(Resource, Filter[], boolean) STYLE DLS_DEAD_LOCAL_STORE 157

com.gridsystems.resource.internal.GroupHolder

Bug Category Details Line
Unchecked/unconfirmed cast from java.rmi.RemoteException to com.gridsystems.innergrid.kernel.KernelException in com.gridsystems.resource.internal.GroupHolder.isAllowed(String, String) STYLE BC_UNCONFIRMED_CAST 446
Unchecked/unconfirmed cast from java.rmi.RemoteException to com.gridsystems.innergrid.kernel.KernelException in com.gridsystems.resource.internal.GroupHolder.isOwner(String) STYLE BC_UNCONFIRMED_CAST 426
Class com.gridsystems.resource.internal.GroupHolder implements Cloneable but does not define or use clone method BAD_PRACTICE CN_IDIOM 68-552
Invocation of toString on resources in com.gridsystems.resource.internal.GroupHolder.removeResources(ResourceId[]) CORRECTNESS DMI_INVOKING_TOSTRING_ON_ARRAY 290
Use of non-localized String.toUpperCase() or String.toLowerCase I18N DM_CONVERT_CASE 277

com.gridsystems.resource.internal.GroupList

Bug Category Details Line
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.GroupList.storeAllGroups() STYLE REC_CATCH_EXCEPTION 636
com.gridsystems.resource.internal.GroupList.synchronizeGroupsAndResources() ignores return value of String.equals(Object) CORRECTNESS RV_RETURN_VALUE_IGNORED 719

com.gridsystems.resource.internal.ResourceHolder

Bug Category Details Line
Class com.gridsystems.resource.internal.ResourceHolder implements Cloneable but does not define or use clone method BAD_PRACTICE CN_IDIOM 57-269

com.gridsystems.resource.internal.ResourceList

Bug Category Details Line
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.ResourceList.storeAllResources() STYLE REC_CATCH_EXCEPTION 361

com.gridsystems.resource.internal.storage.GroupDAO

Bug Category Details Line
Should com.gridsystems.resource.internal.storage.GroupDAO.getFileNames(Group) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 70
Should com.gridsystems.resource.internal.storage.GroupDAO.getFileNames(Map) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 52
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.storage.GroupDAO.getFileNames(Group) STYLE REC_CATCH_EXCEPTION 69
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.storage.GroupDAO.getFileNames(Map) STYLE REC_CATCH_EXCEPTION 51

com.gridsystems.resource.internal.storage.ResourceDAO

Bug Category Details Line
Should com.gridsystems.resource.internal.storage.ResourceDAO.getFileNames(Resource) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 80
Should com.gridsystems.resource.internal.storage.ResourceDAO.getFileNames(Map) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 59

com.gridsystems.resource.internal.utils.GetAllResourcesPagedRequest

Bug Category Details Line
Exception is caught when Exception is not thrown in com.gridsystems.resource.internal.utils.GetAllResourcesPagedRequest.run() STYLE REC_CATCH_EXCEPTION 134

com.gridsystems.resource.internal.utils.ResourceStats

Bug Category Details Line
com.gridsystems.resource.internal.utils.ResourceStats.startThreadOfUseOfCPU() might ignore java.lang.Exception BAD_PRACTICE DE_MIGHT_IGNORE 109
com.gridsystems.resource.internal.utils.ResourceStats.getActiveUtilization() may expose internal representation by returning ResourceStats.activeUtilization MALICIOUS_CODE EI_EXPOSE_REP 220
com.gridsystems.resource.internal.utils.ResourceStats.getMaxUtilization() may expose internal representation by returning ResourceStats.maxUtilization MALICIOUS_CODE EI_EXPOSE_REP 239
com.gridsystems.resource.internal.utils.ResourceStats.getSystemUtilization() may expose internal representation by returning ResourceStats.activeUtilization MALICIOUS_CODE EI_EXPOSE_REP 230
com.gridsystems.resource.internal.utils.ResourceStats.instance isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 58

com.gridsystems.resource.internal.utils.ResourceStats$CpuUsageThread

Bug Category Details Line
Dead store to waittime in com.gridsystems.resource.internal.utils.ResourceStats$CpuUsageThread.run() STYLE DLS_DEAD_LOCAL_STORE 282
Inconsistent synchronization of com.gridsystems.resource.internal.utils.ResourceStats$CpuUsageThread.exitFlag; locked 50% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 290
Unconditional wait in com.gridsystems.resource.internal.utils.ResourceStats$CpuUsageThread.run() MT_CORRECTNESS UW_UNCOND_WAIT 287

com.gridsystems.resource.internal.utils.ResourceStats$IpInfo

Bug Category Details Line
Should com.gridsystems.resource.internal.utils.ResourceStats$IpInfo be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 318-463