diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2014-09-09 13:52:19 +0200 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2014-09-09 13:52:53 +0200 |
commit | 789130734996ee989e534d7b841fc71a23063002 (patch) | |
tree | 2013ecc34e7f21bc59b52c0e5ef6f9ddaf270ea0 /main/src | |
parent | f68437aa50c15bc8d2958589fdc4f38c1a79a38c (diff) | |
download | cgeo-789130734996ee989e534d7b841fc71a23063002.zip cgeo-789130734996ee989e534d7b841fc71a23063002.tar.gz cgeo-789130734996ee989e534d7b841fc71a23063002.tar.bz2 |
Name ignored catch parameter as such
Diffstat (limited to 'main/src')
37 files changed, 53 insertions, 53 deletions
diff --git a/main/src/cgeo/geocaching/AbstractDialogFragment.java b/main/src/cgeo/geocaching/AbstractDialogFragment.java index bd3c31e..7e77a14 100644 --- a/main/src/cgeo/geocaching/AbstractDialogFragment.java +++ b/main/src/cgeo/geocaching/AbstractDialogFragment.java @@ -323,7 +323,7 @@ public abstract class AbstractDialogFragment extends DialogFragment implements C try { CacheMenuHandler.onPrepareOptionsMenu(menu, cache); LoggingUI.onPrepareOptionsMenu(menu, cache); - } catch (final RuntimeException e) { + } catch (final RuntimeException ignored) { // nothing } } diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 8375734..f004ca9 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -278,7 +278,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc title = geocode; } progress.show(this, title, res.getString(R.string.cache_dialog_loading_details), true, loadCacheHandler.cancelMessage()); - } catch (final RuntimeException e) { + } catch (final RuntimeException ignored) { // nothing, we lost the window } @@ -1604,7 +1604,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc if (null != loadingIndicatorView) { loadingIndicatorView.setVisibility(View.GONE); } - } catch (final Exception e) { + } catch (final Exception ignored) { showToast(res.getString(R.string.err_load_descr_failed)); } } diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java index 5eaf17e..349c9e1 100644 --- a/main/src/cgeo/geocaching/CacheListActivity.java +++ b/main/src/cgeo/geocaching/CacheListActivity.java @@ -1279,7 +1279,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA } else { try { sleep(5000); // Wait for 5s if no cache found - } catch (final InterruptedException e) { + } catch (final InterruptedException ignored) { } handler.sendEmptyMessage(MSG_WAITING); } diff --git a/main/src/cgeo/geocaching/CgeoApplication.java b/main/src/cgeo/geocaching/CgeoApplication.java index 34dab09..fe0ed7f 100644 --- a/main/src/cgeo/geocaching/CgeoApplication.java +++ b/main/src/cgeo/geocaching/CgeoApplication.java @@ -82,7 +82,7 @@ public class CgeoApplication extends Application { final Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey"); menuKeyField.setAccessible(true); menuKeyField.setBoolean(config, false); - } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException ignore) { + } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException ignored) { } // Set language to English if the user decided so. diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java index 71db685..e4c5739 100644 --- a/main/src/cgeo/geocaching/DataStore.java +++ b/main/src/cgeo/geocaching/DataStore.java @@ -1003,7 +1003,7 @@ public class DataStore { listId.bindString(1, value); return listId.simpleQueryForLong() != StoredList.TEMPORARY_LIST.id; } - } catch (final SQLiteDoneException e) { + } catch (final SQLiteDoneException ignored) { // Do nothing, it only means we have no information on the cache } catch (final Exception e) { Log.e("DataStore.isOffline", e); @@ -1024,7 +1024,7 @@ public class DataStore { description.bindString(1, guid); return description.simpleQueryForString(); } - } catch (final SQLiteDoneException e) { + } catch (final SQLiteDoneException ignored) { // Do nothing, it only means we have no information on the cache } catch (final Exception e) { Log.e("DataStore.getGeocodeForGuid", e); @@ -2803,7 +2803,7 @@ public class DataStore { } cursor.close(); - } catch (final SQLiteDoneException e) { + } catch (final SQLiteDoneException ignored) { // Do nothing, it only means we have no information on the cache } catch (final Exception e) { Log.e("DataStore.getCacheDescription", e); diff --git a/main/src/cgeo/geocaching/EditWaypointActivity.java b/main/src/cgeo/geocaching/EditWaypointActivity.java index 1ba9c5a..5dfb1d5 100644 --- a/main/src/cgeo/geocaching/EditWaypointActivity.java +++ b/main/src/cgeo/geocaching/EditWaypointActivity.java @@ -291,7 +291,7 @@ public class EditWaypointActivity extends AbstractActionBarActivity implements C Geopoint gp = null; try { gp = new Geopoint(buttonLat.getText().toString(), buttonLon.getText().toString()); - } catch (final Geopoint.ParseException e) { + } catch (final Geopoint.ParseException ignored) { // button text is blank when creating new waypoint } final Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_WAYPOINTS); @@ -387,7 +387,7 @@ public class EditWaypointActivity extends AbstractActionBarActivity implements C double bearing; try { bearing = Double.parseDouble(bearingText); - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { Dialogs.message(EditWaypointActivity.this, R.string.err_point_bear_and_dist_title, R.string.err_point_bear_and_dist); return; } @@ -396,7 +396,7 @@ public class EditWaypointActivity extends AbstractActionBarActivity implements C try { distance = DistanceParser.parseDistance(distanceText, !Settings.isUseImperialUnits()); - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { showToast(res.getString(R.string.err_parse_dist)); return; } diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index 8bf64dc..333090f 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -1671,7 +1671,7 @@ public class Geocache implements ICache, IWaypoint { if (hours >= 0 && hours < 24 && minutes >= 0 && minutes < 60) { return String.valueOf(hours * 60 + minutes); } - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { // cannot happen, but static code analysis doesn't know } } diff --git a/main/src/cgeo/geocaching/Intents.java b/main/src/cgeo/geocaching/Intents.java index 5ed2719..2cbc1b0 100644 --- a/main/src/cgeo/geocaching/Intents.java +++ b/main/src/cgeo/geocaching/Intents.java @@ -91,7 +91,7 @@ public class Intents { } try { return CacheListType.valueOf(typeName); - } catch (final IllegalArgumentException e) { + } catch (final IllegalArgumentException ignored) { return CacheListType.OFFLINE; } } diff --git a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java index f1dc51a..e148717 100644 --- a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java +++ b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java @@ -336,7 +336,7 @@ public class NavigateAnyPointActivity extends AbstractActionBarActivity implemen menu.findItem(R.id.menu_caches_around).setVisible(visible); menu.findItem(R.id.menu_clear_history).setVisible(!getHistoryOfSearchedLocations().isEmpty()); - } catch (final RuntimeException e) { + } catch (final RuntimeException ignored) { // nothing } @@ -518,7 +518,7 @@ public class NavigateAnyPointActivity extends AbstractActionBarActivity implemen double bearing; try { bearing = Double.parseDouble(bearingText); - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { Dialogs.message(this, R.string.err_point_bear_and_dist_title, R.string.err_point_bear_and_dist); return null; } @@ -527,7 +527,7 @@ public class NavigateAnyPointActivity extends AbstractActionBarActivity implemen try { distance = DistanceParser.parseDistance(distanceText, !Settings.isUseImperialUnits()); - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { showToast(res.getString(R.string.err_parse_dist)); return null; } diff --git a/main/src/cgeo/geocaching/SelectMapfileActivity.java b/main/src/cgeo/geocaching/SelectMapfileActivity.java index da41250..697f609 100644 --- a/main/src/cgeo/geocaching/SelectMapfileActivity.java +++ b/main/src/cgeo/geocaching/SelectMapfileActivity.java @@ -53,7 +53,7 @@ public class SelectMapfileActivity extends AbstractFileListActivity<FileSelectio dirChooser.putExtra(FileManagerIntents.EXTRA_BUTTON_TEXT, getString(android.R.string.ok)); startActivityForResult(dirChooser, REQUEST_DIRECTORY); - } catch (android.content.ActivityNotFoundException ex) { + } catch (android.content.ActivityNotFoundException ignored) { // OI file manager not available final Intent dirChooser = new Intent(SelectMapfileActivity.this, SimpleDirChooser.class); dirChooser.putExtra(Intents.EXTRA_START_DIR, LocalStorage.getStorage().getAbsolutePath()); diff --git a/main/src/cgeo/geocaching/UsefulAppsActivity.java b/main/src/cgeo/geocaching/UsefulAppsActivity.java index a2cdaf7..dd92350 100644 --- a/main/src/cgeo/geocaching/UsefulAppsActivity.java +++ b/main/src/cgeo/geocaching/UsefulAppsActivity.java @@ -53,7 +53,7 @@ public class UsefulAppsActivity extends AbstractActionBarActivity { marketIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); activity.startActivity(marketIntent); - } catch (final RuntimeException e) { + } catch (final RuntimeException ignored) { // market not available in standard emulator } } diff --git a/main/src/cgeo/geocaching/Waypoint.java b/main/src/cgeo/geocaching/Waypoint.java index b2c5305..43b24f3 100644 --- a/main/src/cgeo/geocaching/Waypoint.java +++ b/main/src/cgeo/geocaching/Waypoint.java @@ -309,7 +309,7 @@ public class Waypoint implements IWaypoint { waypoints.add(waypoint); count++; } - } catch (final Geopoint.ParseException ignore) { + } catch (final Geopoint.ParseException ignored) { } note = note.substring(matcher.start() + 1); diff --git a/main/src/cgeo/geocaching/apps/cache/navi/GoogleMapsApp.java b/main/src/cgeo/geocaching/apps/cache/navi/GoogleMapsApp.java index 6c184ce..b14ba35 100644 --- a/main/src/cgeo/geocaching/apps/cache/navi/GoogleMapsApp.java +++ b/main/src/cgeo/geocaching/apps/cache/navi/GoogleMapsApp.java @@ -38,7 +38,7 @@ class GoogleMapsApp extends AbstractPointNavigationApp { final String uriString = geoLocation + "?q=" + Uri.encode(query); activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(uriString))); return; - } catch (RuntimeException e) { + } catch (RuntimeException ignored) { // nothing } Log.i("GoogleMapsApp.navigate: No maps application available."); diff --git a/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java b/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java index 7294a40..4c797a1 100644 --- a/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java +++ b/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java @@ -30,7 +30,7 @@ class StreetviewApp extends AbstractPointNavigationApp { try { activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("google.streetview:cbll=" + point.getLatitude() + "," + point.getLongitude()))); - } catch (final ActivityNotFoundException e) { + } catch (final ActivityNotFoundException ignored) { ActivityMixin.showToast(activity, CgeoApplication.getInstance().getString(R.string.err_application_no)); } } diff --git a/main/src/cgeo/geocaching/connector/AbstractConnector.java b/main/src/cgeo/geocaching/connector/AbstractConnector.java index a929e2b..a5d0407 100644 --- a/main/src/cgeo/geocaching/connector/AbstractConnector.java +++ b/main/src/cgeo/geocaching/connector/AbstractConnector.java @@ -108,7 +108,7 @@ public abstract class AbstractConnector implements IConnector { protected static boolean isNumericId(final String str) { try { return Integer.parseInt(str) > 0; - } catch (NumberFormatException e) { + } catch (NumberFormatException ignored) { } return false; } diff --git a/main/src/cgeo/geocaching/connector/gc/GCLogin.java b/main/src/cgeo/geocaching/connector/gc/GCLogin.java index 16f20b8..b2122d4 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCLogin.java +++ b/main/src/cgeo/geocaching/connector/gc/GCLogin.java @@ -312,14 +312,14 @@ public class GCLogin extends AbstractLogin { if (GC_CUSTOM_DATE_FORMATS.containsKey(format)) { try { return GC_CUSTOM_DATE_FORMATS.get(format).parse(trimmed); - } catch (final ParseException e) { + } catch (final ParseException ignored) { } } for (final SimpleDateFormat sdf : GC_CUSTOM_DATE_FORMATS.values()) { try { return sdf.parse(trimmed); - } catch (final ParseException e) { + } catch (final ParseException ignored) { } } diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java index bacaddb..63c42ff 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCMap.java +++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java @@ -98,7 +98,7 @@ public class GCMap { caches.add(cache); } result.addAndPutInCache(caches); - } catch (ParserException | ParseException | IOException | NumberFormatException ignore) { + } catch (ParserException | ParseException | IOException | NumberFormatException ignored) { result.setError(StatusCode.UNKNOWN_ERROR); } return result; diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java index 35a2f52..6cb1bbe 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCParser.java +++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java @@ -1528,7 +1528,7 @@ public abstract class GCParser { if (releaseString != null) { try { trackable.setReleased(dateTbIn1.parse(releaseString)); - } catch (final ParseException ignore) { + } catch (final ParseException ignored) { if (trackable.getReleased() == null) { try { trackable.setReleased(dateTbIn2.parse(releaseString)); @@ -1591,7 +1591,7 @@ public abstract class GCParser { long date = 0; try { date = GCLogin.parseGcCustomDate(matcherLogs.group(2)).getTime(); - } catch (final ParseException ignore) { + } catch (final ParseException ignored) { } final LogEntry logDone = new LogEntry( diff --git a/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java b/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java index eff193a..f9b8e1c 100644 --- a/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java +++ b/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java @@ -46,7 +46,7 @@ public final class UTFGridPosition { final int y = Integer.parseInt(matcher.group(2)); return new UTFGridPosition(x, y); } - } catch (NumberFormatException e) { + } catch (NumberFormatException ignored) { } return new UTFGridPosition(0, 0); } diff --git a/main/src/cgeo/geocaching/enumerations/CacheSize.java b/main/src/cgeo/geocaching/enumerations/CacheSize.java index c4e2831..3a2f379 100644 --- a/main/src/cgeo/geocaching/enumerations/CacheSize.java +++ b/main/src/cgeo/geocaching/enumerations/CacheSize.java @@ -83,7 +83,7 @@ public enum CacheSize { } } } - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { // ignore, as this might be a number or not } return UNKNOWN; diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java index 61d03bc..a6b3907 100644 --- a/main/src/cgeo/geocaching/export/GpxExport.java +++ b/main/src/cgeo/geocaching/export/GpxExport.java @@ -156,7 +156,7 @@ public class GpxExport extends AbstractExport { if (writer != null) { try { writer.close(); - } catch (final IOException e1) { + } catch (final IOException ignored) { // Ignore double error } } diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java index b24eb4c..d3e8887 100644 --- a/main/src/cgeo/geocaching/export/GpxSerializer.java +++ b/main/src/cgeo/geocaching/export/GpxSerializer.java @@ -195,7 +195,7 @@ public final class GpxSerializer { try { final int numericPrefix = Integer.parseInt(prefix); maxPrefix = Math.max(numericPrefix, maxPrefix); - } catch (final NumberFormatException ex) { + } catch (final NumberFormatException ignored) { // ignore non numeric prefix, as it should be unique in the list of non-own waypoints already } } diff --git a/main/src/cgeo/geocaching/files/GPXImporter.java b/main/src/cgeo/geocaching/files/GPXImporter.java index 4f1d391..e7523f3 100644 --- a/main/src/cgeo/geocaching/files/GPXImporter.java +++ b/main/src/cgeo/geocaching/files/GPXImporter.java @@ -211,7 +211,7 @@ public class GPXImporter { } catch (final ParserException e) { Log.i("Importing caches failed - data format error", e); importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_FINISHED_WITH_ERROR, R.string.gpx_import_error_parser, 0, e.getLocalizedMessage())); - } catch (final CancellationException e) { + } catch (final CancellationException ignored) { Log.i("Importing caches canceled"); importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_CANCELED)); } catch (final Exception e) { @@ -294,7 +294,7 @@ public class GPXImporter { try { // try to parse cache file as GPX 10 return doImport(new GPX10Parser(listId)); - } catch (final ParserException pe) { + } catch (final ParserException ignored) { // didn't work -> lets try GPX11 return doImport(new GPX11Parser(listId)); } diff --git a/main/src/cgeo/geocaching/files/GPXParser.java b/main/src/cgeo/geocaching/files/GPXParser.java index 1b57908..bedee43 100644 --- a/main/src/cgeo/geocaching/files/GPXParser.java +++ b/main/src/cgeo/geocaching/files/GPXParser.java @@ -228,7 +228,7 @@ public abstract class GPXParser extends FileParser { String stringName; try { stringName = CgeoApplication.getInstance().getResources().getResourceName(stringId); - } catch (final NullPointerException e) { + } catch (final NullPointerException ignored) { return null; } if (stringName == null) { @@ -614,7 +614,7 @@ public abstract class GPXParser extends FileParser { cache.getAttributes().add(internalId); } } - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { // nothing } } @@ -717,7 +717,7 @@ public abstract class GPXParser extends FileParser { if (attrs.getIndex("ref") > -1) { trackable.setGeocode(attrs.getValue("ref")); } - } catch (final RuntimeException e) { + } catch (final RuntimeException ignored) { // nothing } } @@ -761,7 +761,7 @@ public abstract class GPXParser extends FileParser { if (attrs.getIndex("id") > -1) { log.id = Integer.parseInt(attrs.getValue("id")); } - } catch (final NumberFormatException e) { + } catch (final NumberFormatException ignored) { // nothing } } diff --git a/main/src/cgeo/geocaching/files/LocalStorage.java b/main/src/cgeo/geocaching/files/LocalStorage.java index 6a510d8..8896833 100644 --- a/main/src/cgeo/geocaching/files/LocalStorage.java +++ b/main/src/cgeo/geocaching/files/LocalStorage.java @@ -253,7 +253,7 @@ public final class LocalStorage { } finally { f.close(); } - } catch (final FileNotFoundException e) { + } catch (final FileNotFoundException ignored) { // Do nothing, the file does not exist } catch (final Exception e) { Log.w("could not read saved header " + name + " for " + baseFile, e); diff --git a/main/src/cgeo/geocaching/files/SimpleDirChooser.java b/main/src/cgeo/geocaching/files/SimpleDirChooser.java index 0139206..687aaa0 100644 --- a/main/src/cgeo/geocaching/files/SimpleDirChooser.java +++ b/main/src/cgeo/geocaching/files/SimpleDirChooser.java @@ -142,7 +142,7 @@ public class SimpleDirChooser extends AbstractListActivity { for (final File currentDir : dirs) { listDirs.add(new Option(currentDir.getName(), currentDir.getAbsolutePath(), currentDir.canWrite())); } - } catch (final RuntimeException e) { + } catch (final RuntimeException ignored) { } Collections.sort(listDirs, Option.NAME_COMPARATOR); if (dir.getParent() != null) { diff --git a/main/src/cgeo/geocaching/geopoint/GeopointParser.java b/main/src/cgeo/geocaching/geopoint/GeopointParser.java index b486f01..33e91c4 100644 --- a/main/src/cgeo/geocaching/geopoint/GeopointParser.java +++ b/main/src/cgeo/geocaching/geopoint/GeopointParser.java @@ -92,7 +92,7 @@ class GeopointParser { try { return new ResultWrapper(Double.valueOf(replaceSpaceAfterComma), 0, text.length()); - } catch (NumberFormatException e1) { + } catch (NumberFormatException ignored) { // fall through to advanced parsing } @@ -126,7 +126,7 @@ class GeopointParser { final int pos = (latlon == LatLon.LON ? text.lastIndexOf(textPart) : text.indexOf(textPart)); return new ResultWrapper(Double.parseDouble(textPart), pos, textPart.length()); } - } catch (NumberFormatException e) { + } catch (NumberFormatException ignored) { // The right exception will be raised below. } diff --git a/main/src/cgeo/geocaching/loaders/AbstractSearchLoader.java b/main/src/cgeo/geocaching/loaders/AbstractSearchLoader.java index b2cb0b2..6d6d528 100644 --- a/main/src/cgeo/geocaching/loaders/AbstractSearchLoader.java +++ b/main/src/cgeo/geocaching/loaders/AbstractSearchLoader.java @@ -95,7 +95,7 @@ public abstract class AbstractSearchLoader extends AsyncTaskLoader<SearchResult> public void waitForUser() { try { latch.await(); - } catch (InterruptedException e) { + } catch (InterruptedException ignored) { Log.w("searchThread is not waiting for user…"); } } diff --git a/main/src/cgeo/geocaching/maps/MapProviderFactory.java b/main/src/cgeo/geocaching/maps/MapProviderFactory.java index 212188d..a640847 100644 --- a/main/src/cgeo/geocaching/maps/MapProviderFactory.java +++ b/main/src/cgeo/geocaching/maps/MapProviderFactory.java @@ -42,7 +42,7 @@ public class MapProviderFactory { // Check if API is available try { Class.forName("com.google.android.maps.MapActivity"); - } catch (final ClassNotFoundException e) { + } catch (final ClassNotFoundException ignored) { return false; } diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapView.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapView.java index c611790..b07f561 100644 --- a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapView.java +++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapView.java @@ -83,7 +83,7 @@ public class GoogleMapView extends MapView implements MapViewImpl { controller.getZoomControls().setLayoutParams(zoomParams); super.displayZoomControls(takeFocus); - } catch (NoSuchMethodException e) { + } catch (NoSuchMethodException ignored) { Log.w("GoogleMapView.displayZoomControls: unable to explicitly place the zoom buttons"); } catch (Exception e) { Log.e("GoogleMapView.displayZoomControls", e); diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java index d95cc80..81dafb4 100644 --- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java +++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java @@ -234,7 +234,7 @@ public class MapsforgeMapView extends MapView implements MapViewImpl { if (StringUtils.isNotEmpty(customRenderTheme)) { try { setRenderTheme(new File(customRenderTheme)); - } catch (FileNotFoundException e) { + } catch (FileNotFoundException ignored) { Toast.makeText( getContext(), getContext().getResources().getString(R.string.warn_rendertheme_missing), diff --git a/main/src/cgeo/geocaching/settings/SettingsActivity.java b/main/src/cgeo/geocaching/settings/SettingsActivity.java index b66bd7c..b678239 100644 --- a/main/src/cgeo/geocaching/settings/SettingsActivity.java +++ b/main/src/cgeo/geocaching/settings/SettingsActivity.java @@ -296,7 +296,7 @@ public class SettingsActivity extends PreferenceActivity { dirChooser.putExtra(FileManagerIntents.EXTRA_BUTTON_TEXT, getString(android.R.string.ok)); startActivityForResult(dirChooser, dct.requestCode); - } catch (final android.content.ActivityNotFoundException ex) { + } catch (final android.content.ActivityNotFoundException ignored) { // OI file manager not available final Intent dirChooser = new Intent(this, SimpleDirChooser.class); dirChooser.putExtra(Intents.EXTRA_START_DIR, startDirectory); diff --git a/main/src/cgeo/geocaching/ui/AnchorAwareLinkMovementMethod.java b/main/src/cgeo/geocaching/ui/AnchorAwareLinkMovementMethod.java index d4c2e10..870eef1 100644 --- a/main/src/cgeo/geocaching/ui/AnchorAwareLinkMovementMethod.java +++ b/main/src/cgeo/geocaching/ui/AnchorAwareLinkMovementMethod.java @@ -29,7 +29,7 @@ public class AnchorAwareLinkMovementMethod extends LinkMovementMethod { public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) { try { return super.onTouchEvent(widget, buffer, event); - } catch (Exception e) { + } catch (Exception ignored) { // local links to anchors don't work } return false; diff --git a/main/src/cgeo/geocaching/ui/DecryptTextClickListener.java b/main/src/cgeo/geocaching/ui/DecryptTextClickListener.java index 3af950f..421d7aa 100644 --- a/main/src/cgeo/geocaching/ui/DecryptTextClickListener.java +++ b/main/src/cgeo/geocaching/ui/DecryptTextClickListener.java @@ -30,7 +30,7 @@ public class DecryptTextClickListener implements View.OnClickListener { } else { targetView.setText(CryptUtils.rot13((String) text)); } - } catch (final RuntimeException ignore) { + } catch (final RuntimeException ignored) { // nothing } } diff --git a/main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java b/main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java index a0c8b52..30778a1 100644 --- a/main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java +++ b/main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java @@ -28,7 +28,7 @@ public class IndexOutOfBoundsAvoidingTextView extends TextView { protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { try{ super.onMeasure(widthMeasureSpec, heightMeasureSpec); - } catch (IndexOutOfBoundsException e) { + } catch (IndexOutOfBoundsException ignored) { setText(getText().toString()); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } @@ -38,7 +38,7 @@ public class IndexOutOfBoundsAvoidingTextView extends TextView { public void setGravity(int gravity){ try{ super.setGravity(gravity); - } catch (IndexOutOfBoundsException e) { + } catch (IndexOutOfBoundsException ignored) { setText(getText().toString()); super.setGravity(gravity); } @@ -48,7 +48,7 @@ public class IndexOutOfBoundsAvoidingTextView extends TextView { public void setText(CharSequence text, BufferType type) { try{ super.setText(text, type); - } catch (IndexOutOfBoundsException e) { + } catch (IndexOutOfBoundsException ignored) { setText(text.toString()); } } diff --git a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java index 9aee71a..72eabf4 100644 --- a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java +++ b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java @@ -421,7 +421,7 @@ public class CoordinatesInputDialog extends DialogFragment { gp = current; return true; } - } catch (final Geopoint.ParseException e) { + } catch (final Geopoint.ParseException ignored) { // Signaled and returned below } if (signalError) { diff --git a/main/src/cgeo/geocaching/utils/ProcessUtils.java b/main/src/cgeo/geocaching/utils/ProcessUtils.java index d80674b..4a9ebdb 100644 --- a/main/src/cgeo/geocaching/utils/ProcessUtils.java +++ b/main/src/cgeo/geocaching/utils/ProcessUtils.java @@ -65,7 +65,7 @@ public final class ProcessUtils { // This can throw an exception where the exception type is only defined on API Level > 3 // therefore surround with try-catch return packageManager.getLaunchIntentForPackage(packageName); - } catch (final Exception e) { + } catch (final Exception ignored) { return null; } } |