diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-08-26 18:56:59 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-08-26 18:56:59 +0200 |
| commit | c373effbc49b5b1d9443a84f9fa234be371cdf4a (patch) | |
| tree | ccac5d2564d16e48054a0b79f5defe67ae4a5dd1 /main/src/cgeo/geocaching/MainActivity.java | |
| parent | 1bdbb52841f11559fe8d4ab69c27ef6ed3521d43 (diff) | |
| download | cgeo-c373effbc49b5b1d9443a84f9fa234be371cdf4a.zip cgeo-c373effbc49b5b1d9443a84f9fa234be371cdf4a.tar.gz cgeo-c373effbc49b5b1d9443a84f9fa234be371cdf4a.tar.bz2 | |
refactoring: findbugs cleanup
* don't catch raw exceptions
Diffstat (limited to 'main/src/cgeo/geocaching/MainActivity.java')
| -rw-r--r-- | main/src/cgeo/geocaching/MainActivity.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java index c7c28f3..b6f267a 100644 --- a/main/src/cgeo/geocaching/MainActivity.java +++ b/main/src/cgeo/geocaching/MainActivity.java @@ -47,6 +47,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -141,7 +142,7 @@ public class MainActivity extends AbstractActivity { navLocation.setText(StringUtils.join(addressParts, ", ")); } - } catch (Exception e) { + } catch (RuntimeException e) { // nothing } @@ -721,7 +722,7 @@ public class MainActivity extends AbstractActivity { final Geocoder geocoder = new Geocoder(MainActivity.this, Locale.getDefault()); final Geopoint coords = app.currentGeo().getCoords(); addresses = geocoder.getFromLocation(coords.getLatitude(), coords.getLongitude(), 1); - } catch (Exception e) { + } catch (IOException e) { Log.i("Failed to obtain address"); } |
