aboutsummaryrefslogtreecommitdiffstats
path: root/main/.classpath
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2011-10-08 18:00:26 +0200
committerSamuel Tardieu <sam@rfc1149.net>2011-10-09 09:32:17 +0200
commit9506d9a7eb13c04f05f89c7ddd9382b2df4d1b4e (patch)
treee9e9d0ac47f9217262416703678ac293950c5bdb /main/.classpath
parent97f6b2ec8434efa54114eb9efff7a4ee6ddf8f68 (diff)
downloadcgeo-9506d9a7eb13c04f05f89c7ddd9382b2df4d1b4e.zip
cgeo-9506d9a7eb13c04f05f89c7ddd9382b2df4d1b4e.tar.gz
cgeo-9506d9a7eb13c04f05f89c7ddd9382b2df4d1b4e.tar.bz2
Fix semantics of cgeo.geocaching.utils.CollectionUtils.isEmpty()
The two instances of isEmpty() are obviously wrong with regards to the null pointer. Right now, a null pointer is considered neither empty nor not-empty. The error shows up in commit 53936c7ee6654a525075b03e1b4c8ddbfbcd4ef5 introducing CollectionUtils where logCounts == null || logCounts.isEmpty() has been changed into CollectionUtils.isEmpty(logCounts) A null logCounts variable would make the condition evaluate to false while it should evaluate to true. The logical flow for isEmpty(List<T> list) found at cgeomaps.java:34 shows that an empty "maps" variable will cause a null pointer exception in the subsequent for loop of the else clause. The one for isEmpty(Map<T, T2> map) found at cgData.java:1635 exhibits the same behaviour.
Diffstat (limited to 'main/.classpath')
0 files changed, 0 insertions, 0 deletions