SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
107 30 0 0

Files

Class Bugs
org.mycore.restapi.MCRTransactionFilter 1
org.mycore.restapi.v1.MCRRestAPISearch 1
org.mycore.restapi.v1.errors.MCRRestAPIException 1
org.mycore.restapi.v1.utils.MCRJSONFileVisitor 5
org.mycore.restapi.v1.utils.MCRPropertiesToJSONTransformer$BundleMapSerializer 1
org.mycore.restapi.v1.utils.MCRRestAPIObjectsHelper 3
org.mycore.restapi.v1.utils.MCRRestAPISortObjectComparator 1
org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper 6
org.mycore.restapi.v2.MCRErrorResponse 2
org.mycore.restapi.v2.MCREventHandler$MCRPathHandler 1
org.mycore.restapi.v2.MCRRestDerivateContents 4
org.mycore.restapi.v2.MCRRestDerivates$DerivateMetadata 4

org.mycore.restapi.MCRTransactionFilter

Bug Category Details Line Priority
Dead store to mcrSession in org.mycore.restapi.MCRTransactionFilter.filter(ContainerRequestContext) STYLE DLS_DEAD_LOCAL_STORE 47 Medium

org.mycore.restapi.v1.MCRRestAPISearch

Bug Category Details Line Priority
Possible null pointer dereference of wt in org.mycore.restapi.v1.MCRRestAPISearch.search(UriInfo, HttpServletRequest, String, String, String, String, String, List, List, String, String, String, List, String, String) CORRECTNESS NP_NULL_ON_SOME_PATH 156 Medium

org.mycore.restapi.v1.errors.MCRRestAPIException

Bug Category Details Line Priority
org.mycore.restapi.v1.errors.MCRRestAPIException.getErrors() may expose internal representation by returning MCRRestAPIException.errors MALICIOUS_CODE EI_EXPOSE_REP 53 Medium

org.mycore.restapi.v1.utils.MCRJSONFileVisitor

Bug Category Details Line Priority
new org.mycore.restapi.v1.utils.MCRJSONFileVisitor(JsonWriter, MCRObjectID, MCRObjectID, UriInfo, Application) may expose internal representation by storing an externally mutable object into MCRJSONFileVisitor.jw MALICIOUS_CODE EI_EXPOSE_REP2 61 Medium
Possible null pointer dereference in org.mycore.restapi.v1.utils.MCRJSONFileVisitor.visitFile(Path, BasicFileAttributes) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 111 Medium
Possible null pointer dereference in org.mycore.restapi.v1.utils.MCRJSONFileVisitor.visitFile(Path, BasicFileAttributes) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 114 Medium
Possible null pointer dereference in org.mycore.restapi.v1.utils.MCRJSONFileVisitor.writePathInfo(Path, BasicFileAttributes) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 77 Medium
Possible null pointer dereference in org.mycore.restapi.v1.utils.MCRJSONFileVisitor.writePathInfo(Path, BasicFileAttributes) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 84 Medium

org.mycore.restapi.v1.utils.MCRPropertiesToJSONTransformer$BundleMapSerializer

Bug Category Details Line Priority
org.mycore.restapi.v1.utils.MCRPropertiesToJSONTransformer$BundleMapSerializer.serialize(Map, Type, JsonSerializationContext) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 91 Medium

org.mycore.restapi.v1.utils.MCRRestAPIObjectsHelper

Bug Category Details Line Priority
Call to method of static java.text.DateFormat in org.mycore.restapi.v1.utils.MCRRestAPIObjectsHelper.listDerivates(UriInfo, String, String, String) MT_CORRECTNESS STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE 595 Medium
Call to method of static java.text.DateFormat in org.mycore.restapi.v1.utils.MCRRestAPIObjectsHelper.listObjects(UriInfo, String, String, String) MT_CORRECTNESS STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE 434 Medium
Call to method of static java.text.DateFormat in org.mycore.restapi.v1.utils.MCRRestAPIObjectsHelper.validateDateInput(String) MT_CORRECTNESS STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE 763 Medium

org.mycore.restapi.v1.utils.MCRRestAPISortObjectComparator

Bug Category Details Line Priority
new org.mycore.restapi.v1.utils.MCRRestAPISortObjectComparator(MCRRestAPISortObject) may expose internal representation by storing an externally mutable object into MCRRestAPISortObjectComparator.sortObj MALICIOUS_CODE EI_EXPOSE_REP2 40 Medium

org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper

Bug Category Details Line Priority
Possible null pointer dereference in org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper.uploadFile(UriInfo, HttpServletRequest, String, String, InputStream, FormDataContentDisposition, String, boolean, boolean, String, Long) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 315 Medium
Possible null pointer dereference in org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper.uploadFile(UriInfo, HttpServletRequest, String, String, InputStream, FormDataContentDisposition, String, boolean, boolean, String, Long) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 331 Medium
Exception is caught when Exception is not thrown in org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper.uploadDerivate(UriInfo, HttpServletRequest, String, String, String, boolean) STYLE REC_CATCH_EXCEPTION 239 Medium
Useless object stored in variable parameter of method org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper.deleteAllFiles(UriInfo, HttpServletRequest, String, String) STYLE UC_USELESS_OBJECT 364 Medium
Useless object stored in variable parameter of method org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper.uploadFile(UriInfo, HttpServletRequest, String, String, InputStream, FormDataContentDisposition, String, boolean, boolean, String, Long) STYLE UC_USELESS_OBJECT 266 Medium
org.mycore.restapi.v1.utils.MCRRestAPIUploadHelper.generateMessagesFromProperties(SortedMap) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 429 Medium

org.mycore.restapi.v2.MCRErrorResponse

Bug Category Details Line Priority
org.mycore.restapi.v2.MCRErrorResponse.getCause() may expose internal representation by returning MCRErrorResponse.cause MALICIOUS_CODE EI_EXPOSE_REP 160 Medium
org.mycore.restapi.v2.MCRErrorResponse.setCause(Throwable) may expose internal representation by storing an externally mutable object into MCRErrorResponse.cause MALICIOUS_CODE EI_EXPOSE_REP2 164 Medium

org.mycore.restapi.v2.MCREventHandler$MCRPathHandler

Bug Category Details Line Priority
Possible null pointer dereference in org.mycore.restapi.v2.MCREventHandler$MCRPathHandler.sendEvent(MCREvent, Path, BasicFileAttributes) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 293 Medium

org.mycore.restapi.v2.MCRRestDerivateContents

Bug Category Details Line Priority
Dead store to mcrSession in org.mycore.restapi.v2.MCRRestDerivateContents.doWithinTransaction(MCRRestDerivateContents$IOOperation) STYLE DLS_DEAD_LOCAL_STORE 154 Medium
Possible null pointer dereference in org.mycore.restapi.v2.MCRRestDerivateContents.createFileOrDirectory(InputStream) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 388 Medium
Possible null pointer dereference in org.mycore.restapi.v2.MCRRestDerivateContents.updateFile(InputStream, MCRPath) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 172 Medium
Exceptional return value of java.io.File.delete() ignored in org.mycore.restapi.v2.MCRRestDerivateContents.updateFile(InputStream, MCRPath) BAD_PRACTICE RV_RETURN_VALUE_IGNORED_BAD_PRACTICE 188 Medium

org.mycore.restapi.v2.MCRRestDerivates$DerivateMetadata

Bug Category Details Line Priority
org.mycore.restapi.v2.MCRRestDerivates$DerivateMetadata.getClassifications() may expose internal representation by returning MCRRestDerivates$DerivateMetadata.classifications MALICIOUS_CODE EI_EXPOSE_REP 567 Medium
org.mycore.restapi.v2.MCRRestDerivates$DerivateMetadata.getTitles() may expose internal representation by returning MCRRestDerivates$DerivateMetadata.titles MALICIOUS_CODE EI_EXPOSE_REP 577 Medium
org.mycore.restapi.v2.MCRRestDerivates$DerivateMetadata.setClassifications(List) may expose internal representation by storing an externally mutable object into MCRRestDerivates$DerivateMetadata.classifications MALICIOUS_CODE EI_EXPOSE_REP2 573 Medium
org.mycore.restapi.v2.MCRRestDerivates$DerivateMetadata.setTitles(List) may expose internal representation by storing an externally mutable object into MCRRestDerivates$DerivateMetadata.titles MALICIOUS_CODE EI_EXPOSE_REP2 582 Medium