diff options
author | blafoo <github@blafoo.de> | 2012-01-14 11:19:19 +0100 |
---|---|---|
committer | blafoo <github@blafoo.de> | 2012-01-14 11:20:40 +0100 |
commit | 46774378b7d391245a2e26b78209b68136e29d1c (patch) | |
tree | 14bd48192aaa4372cd73c8987eb7058e3203ff67 /main/src | |
parent | 790628b3e3c8c707b984dd5dbd2367efa08a03d7 (diff) | |
download | cgeo-46774378b7d391245a2e26b78209b68136e29d1c.zip cgeo-46774378b7d391245a2e26b78209b68136e29d1c.tar.gz cgeo-46774378b7d391245a2e26b78209b68136e29d1c.tar.bz2 |
Revert "Removed unnecessary method"
This reverts commit 7e21dc4dbd9e89ad8a6a44c66ba9c9fb06063ee2.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/cgeo/geocaching/cgBase.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/cgBase.java b/main/src/cgeo/geocaching/cgBase.java index 8f768e9..18c14ff 100644 --- a/main/src/cgeo/geocaching/cgBase.java +++ b/main/src/cgeo/geocaching/cgBase.java @@ -947,6 +947,8 @@ public class cgBase { } } + checkFields(cache); + // cache personal note cache.setPersonalNote(BaseUtils.getMatch(page, GCConstants.PATTERN_PERSONALNOTE, true, cache.getPersonalNote())); @@ -1319,6 +1321,48 @@ public class cgBase { return logs; } + private static void checkFields(cgCache cache) { + if (StringUtils.isBlank(cache.getGeocode())) { + Log.e(Settings.tag, "cgBase.loadLogsFromDetails: geo code not parsed correctly"); + } + if (StringUtils.isBlank(cache.getName())) { + Log.e(Settings.tag, "name not parsed correctly"); + } + if (StringUtils.isBlank(cache.getGuid())) { + Log.e(Settings.tag, "guid not parsed correctly"); + } + if (cache.getTerrain() == 0.0) { + Log.e(Settings.tag, "terrain not parsed correctly"); + } + if (cache.getDifficulty() == 0.0) { + Log.e(Settings.tag, "difficulty not parsed correctly"); + } + if (StringUtils.isBlank(cache.getOwner())) { + Log.e(Settings.tag, "owner not parsed correctly"); + } + if (StringUtils.isBlank(cache.getOwnerReal())) { + Log.e(Settings.tag, "owner real not parsed correctly"); + } + if (cache.getHiddenDate() == null) { + Log.e(Settings.tag, "hidden not parsed correctly"); + } + if (cache.getFavoritePoints() < 0) { + Log.e(Settings.tag, "favoriteCount not parsed correctly"); + } + if (cache.getSize() == null) { + Log.e(Settings.tag, "size not parsed correctly"); + } + if (cache.getType() == null || cache.getType() == CacheType.UNKNOWN) { + Log.e(Settings.tag, "type not parsed correctly"); + } + if (cache.getCoords() == null) { + Log.e(Settings.tag, "coordinates not parsed correctly"); + } + if (StringUtils.isBlank(cache.getLocation())) { + Log.e(Settings.tag, "location not parsed correctly"); + } + } + public static Date parseGcCustomDate(final String input, final String format) throws ParseException { if (StringUtils.isBlank(input)) { throw new ParseException("Input is null", 0); |