Can someone explain to me why this causes a findbug warning:
if (m != null && m.getModifiedDate() != null) content.put("ModifiedDate", m.getModifiedDate().getTime());
and it works:
if(m != null){ Date date = m.getModifiedDate(); if (date != null) content.put("ModifiedDate", date .getTime()); }
Warning: possible dereferencing of a null pointer due to the return value of the called method.
Is it possible to tell FindBugs that Example # 1 should not be a warning?
java eclipse findbugs
soulcinder
source share