FindBugs

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.

解決:
FindBugs

May expose internal representation by incorporating reference to mutable object

This code stores a reference to an externally mutable object into 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. Storing a copy of the object is better approach in many situations.

解決
FindBugs

Write to static field from instance method

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.

解決
FindBugs

其他錯誤可參考
https://www.jianshu.com/p/650bab4a5ccd

上一篇:[问题解决]大数据量上载excel文件数据到SAP系统[ALSM_EXCEL_TO_INTERNAL_TABLE]


下一篇:无法解析的外部符号 "class google::protobuf::internal::ExplicitlyConstructed fixed_address_empty_string