SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.8.6

Threshold is low

Effort is max

Summary

Classes Bugs Errors Missing Classes
118 30 0 0

Files

Class Bugs
io.github.rose.core.function.Predicates 1
io.github.rose.core.function.Try 3
io.github.rose.core.json.Java8TimeModule 1
io.github.rose.core.json.JsonUtils 1
io.github.rose.core.spring.BeanUtils 1
io.github.rose.core.spring.SpringContextHolder 1
io.github.rose.core.spring.WebUtils 4
io.github.rose.core.spring.expression.SpringExpressionResolver 3
io.github.rose.core.spring.factory.YamlPropertySourceFactory 2
io.github.rose.core.util.CurrentInstance 3
io.github.rose.core.util.EnumUtil 1
io.github.rose.core.util.NanoId 1
io.github.rose.core.util.NetUtils 3
io.github.rose.core.util.RestResponse 1
io.github.rose.core.util.ServiceLoaders 1
io.github.rose.core.util.StringPool 1
io.github.rose.core.util.tree.TreeNode 1
io.github.rose.core.util.tree.TreeNodeConfig 1

io.github.rose.core.function.Predicates

Bug Category Details Line Priority
Class io.github.rose.core.function.Predicates is final but declares protected field io.github.rose.core.function.Predicates.EMPTY_PREDICATE_ARRAY STYLE CI_CONFUSED_INHERITANCE Not available Low

io.github.rose.core.function.Try

Bug Category Details Line Priority
Return value of java.util.Objects.nonNull(Object) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 157 Medium
Return value of java.util.Objects.nonNull(Object) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 85 Medium
Return value of java.util.Objects.nonNull(Object) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 208 Medium

io.github.rose.core.json.Java8TimeModule

Bug Category Details Line Priority
io.github.rose.core.json.Java8TimeModule is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 35-48 Low

io.github.rose.core.json.JsonUtils

Bug Category Details Line Priority
Should io.github.rose.core.json.JsonUtils.toBytes(Object) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 60 Low

io.github.rose.core.spring.BeanUtils

Bug Category Details Line Priority
The class name io.github.rose.core.spring.BeanUtils shadows the simple name of the superclass org.springframework.beans.BeanUtils BAD_PRACTICE NM_SAME_SIMPLE_NAME_AS_SUPERCLASS 34-103 High

io.github.rose.core.spring.SpringContextHolder

Bug Category Details Line Priority
Write to static field io.github.rose.core.spring.SpringContextHolder.applicationContext from instance method io.github.rose.core.spring.SpringContextHolder.setApplicationContext(ApplicationContext) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 49 High

io.github.rose.core.spring.WebUtils

Bug Category Details Line Priority
The class name io.github.rose.core.spring.WebUtils shadows the simple name of the superclass org.springframework.web.util.WebUtils BAD_PRACTICE NM_SAME_SIMPLE_NAME_AS_SUPERCLASS 39-175 High
Possible null pointer dereference in io.github.rose.core.spring.WebUtils.getResponse() due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 175 Medium
Possible null pointer dereference in io.github.rose.core.spring.WebUtils.ofRequest() due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 167 Medium
Switch statement found in io.github.rose.core.spring.WebUtils.getPort(HttpServletRequest) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 141-146 Medium

io.github.rose.core.spring.expression.SpringExpressionResolver

Bug Category Details Line Priority
Incorrect lazy initialization of static field io.github.rose.core.spring.expression.SpringExpressionResolver.INSTANCE in io.github.rose.core.spring.expression.SpringExpressionResolver.getInstance() MT_CORRECTNESS LI_LAZY_INIT_STATIC 81-82 Low
Instance-getter method of class using singleton design pattern (io.github.rose.core.spring.expression.SpringExpressionResolver) is not synchronized. CORRECTNESS SING_SINGLETON_GETTER_NOT_SYNCHRONIZED 81-85 Medium
Class (io.github.rose.core.spring.expression.SpringExpressionResolver) using singleton design pattern has non-private constructor. CORRECTNESS SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR 58-73 Medium

io.github.rose.core.spring.factory.YamlPropertySourceFactory

Bug Category Details Line Priority
Unchecked/unconfirmed cast from Throwable to java.io.FileNotFoundException of return value in io.github.rose.core.spring.factory.YamlPropertySourceFactory.loadYamlIntoProperties(EncodedResource) STYLE BC_UNCONFIRMED_CAST_OF_RETURN_VALUE 49 Low
Possible null pointer dereference in io.github.rose.core.spring.factory.YamlPropertySourceFactory.createPropertySource(String, EncodedResource) due to return value of called method STYLE NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 37 Medium

io.github.rose.core.util.CurrentInstance

Bug Category Details Line Priority
Dead store of null to map in io.github.rose.core.util.CurrentInstance.doSet(Class, Object) STYLE DLS_DEAD_LOCAL_STORE_OF_NULL 144 Low
Class io.github.rose.core.util.CurrentInstance defines non-transient non-serializable instance field instance BAD_PRACTICE SE_BAD_FIELD Not available High
io.github.rose.core.util.CurrentInstance is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 44-242 Low

io.github.rose.core.util.EnumUtil

Bug Category Details Line Priority
Should io.github.rose.core.util.EnumUtil.enumArrayOf(long, Class) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 262 Low

io.github.rose.core.util.NanoId

Bug Category Details Line Priority
io.github.rose.core.util.NanoId.DEFAULT_ALPHABET should be package protected MALICIOUS_CODE MS_PKGPROTECT 43 Medium

io.github.rose.core.util.NetUtils

Bug Category Details Line Priority
Incorrect lazy initialization of static field io.github.rose.core.util.NetUtils.localInetAddress in io.github.rose.core.util.NetUtils.getLocalInetAddress(Map) MT_CORRECTNESS LI_LAZY_INIT_STATIC 68-86 Low
Exception is caught when Exception is not thrown in io.github.rose.core.util.NetUtils.getFirstInet4AddressByNetwork() STYLE REC_CATCH_EXCEPTION 231 Low
Exception is caught when Exception is not thrown in io.github.rose.core.util.NetUtils.getLocalAddressByDatagram() STYLE REC_CATCH_EXCEPTION 130 Low

io.github.rose.core.util.RestResponse

Bug Category Details Line Priority
io.github.rose.core.util.RestResponse is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 36-86 Low

io.github.rose.core.util.ServiceLoaders

Bug Category Details Line Priority
io.github.rose.core.util.ServiceLoaders.load(Class, ClassLoader[]) might ignore java.lang.Exception BAD_PRACTICE DE_MIGHT_IGNORE 44 Low

io.github.rose.core.util.StringPool

Bug Category Details Line Priority
io.github.rose.core.util.StringPool.BYTES_NEW_LINE should be package protected MALICIOUS_CODE MS_PKGPROTECT 106 Low

io.github.rose.core.util.tree.TreeNode

Bug Category Details Line Priority
Class io.github.rose.core.util.tree.TreeNode defines non-transient non-serializable instance field weight BAD_PRACTICE SE_BAD_FIELD Not available Low

io.github.rose.core.util.tree.TreeNodeConfig

Bug Category Details Line Priority
io.github.rose.core.util.tree.TreeNodeConfig.DEFAULT_CONFIG isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 32 High