diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2015-01-01 22:30:52 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2015-01-01 22:51:40 +0100 |
| commit | f309b4637be11ce7b740e7dc843936fb707ecfb1 (patch) | |
| tree | ca1fc605c5fdb45cda548c5e2f006903da01c67f /main/src/cgeo/geocaching/export | |
| parent | 2780031fe84315e45059d14071b89954204f8eac (diff) | |
| download | cgeo-f309b4637be11ce7b740e7dc843936fb707ecfb1.zip cgeo-f309b4637be11ce7b740e7dc843936fb707ecfb1.tar.gz cgeo-f309b4637be11ce7b740e7dc843936fb707ecfb1.tar.bz2 | |
use more nullable annotations
* make the DataStore methods use explicit nullable or nonnull return
values
* remove the null return of getStoredList()
* unfortunately many of the test methods need an assert() statement to
make Eclipse understand the null logic
Diffstat (limited to 'main/src/cgeo/geocaching/export')
| -rw-r--r-- | main/src/cgeo/geocaching/export/FieldnoteExport.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/export/FieldnoteExport.java b/main/src/cgeo/geocaching/export/FieldnoteExport.java index c03b848..c4a6adc 100644 --- a/main/src/cgeo/geocaching/export/FieldnoteExport.java +++ b/main/src/cgeo/geocaching/export/FieldnoteExport.java @@ -59,10 +59,11 @@ public class FieldnoteExport extends AbstractExport { final AlertDialog.Builder builder = new AlertDialog.Builder(activity); final Context themedContext; - if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB) + if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB) { themedContext = new ContextThemeWrapper(activity, R.style.dark); - else + } else { themedContext = activity; + } final View layout = View.inflate(themedContext, R.layout.fieldnote_export_dialog, null); builder.setView(layout); @@ -135,8 +136,10 @@ public class FieldnoteExport extends AbstractExport { for (final Geocache cache : caches) { if (ConnectorFactory.getConnector(cache).equals(connector) && cache.isLogOffline()) { final LogEntry log = DataStore.loadLogOffline(cache.getGeocode()); - if (!onlyNew || log.date > Settings.getFieldnoteExportDate()) { - fieldNotes.add(cache, log); + if (log != null) { + if (!onlyNew || log.date > Settings.getFieldnoteExportDate()) { + fieldNotes.add(cache, log); + } } } publishProgress(++i); |
