From 536bdbb726986282dba14f0924f11eddfd32ecab Mon Sep 17 00:00:00 2001 From: rsudev Date: Thu, 23 Jan 2014 16:07:36 +0100 Subject: Corrections for null analysis --- main/src/cgeo/geocaching/export/GpxSerializer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main/src') diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java index 2afed44..df07f17 100644 --- a/main/src/cgeo/geocaching/export/GpxSerializer.java +++ b/main/src/cgeo/geocaching/export/GpxSerializer.java @@ -90,7 +90,10 @@ public final class GpxSerializer { private void exportBatch(final XmlSerializer gpx, Collection geocodesOfBatch) throws IOException { final Set caches = DataStore.loadCaches(geocodesOfBatch, LoadFlags.LOAD_ALL_DB_ONLY); for (final Geocache cache : caches) { - final Geopoint coords = cache != null ? cache.getCoords() : null; + if (cache == null) { + continue; + } + final Geopoint coords = cache.getCoords(); if (coords == null) { // Export would be invalid without coordinates. continue; -- cgit v1.1 From f6aa1c406c4e7bb7d9aaf3fd201e0e1d2117bb2c Mon Sep 17 00:00:00 2001 From: rsudev Date: Thu, 23 Jan 2014 16:08:36 +0100 Subject: Fixes #3564, Tweets not posted - Switched to https twitter api --- main/src/cgeo/geocaching/twitter/Twitter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/src') diff --git a/main/src/cgeo/geocaching/twitter/Twitter.java b/main/src/cgeo/geocaching/twitter/Twitter.java index 7213789..51cf6e2 100644 --- a/main/src/cgeo/geocaching/twitter/Twitter.java +++ b/main/src/cgeo/geocaching/twitter/Twitter.java @@ -57,8 +57,8 @@ public final class Twitter { "display_coordinates", "true"); } - OAuth.signOAuth("api.twitter.com", "/1.1/statuses/update.json", "POST", false, parameters, Settings.getTokenPublic(), Settings.getTokenSecret(), Settings.getKeyConsumerPublic(), Settings.getKeyConsumerSecret()); - final HttpResponse httpResponse = Network.postRequest("http://api.twitter.com/1.1/statuses/update.json", parameters); + OAuth.signOAuth("api.twitter.com", "/1.1/statuses/update.json", "POST", true, parameters, Settings.getTokenPublic(), Settings.getTokenSecret(), Settings.getKeyConsumerPublic(), Settings.getKeyConsumerSecret()); + final HttpResponse httpResponse = Network.postRequest("https://api.twitter.com/1.1/statuses/update.json", parameters); if (httpResponse != null) { if (httpResponse.getStatusLine().getStatusCode() == 200) { Log.i("Tweet posted"); -- cgit v1.1