Suppressing Java Findbugs error (EI_EXPOSE_REP)

有些话、适合烂在心里 提交于 2019-12-01 17:04:22

I just realized that Findbugs analyzes compiled code (.class files), not source code. After rebuilding and re-running Findbugs, the problem went away.

Jignesh Vachhani

No,we need to clone that object using below code :

public Date getSomeDate() {
  return new Date(someDate.getTime()).clone();
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!