diff options
Diffstat (limited to 'main/src')
10 files changed, 23 insertions, 15 deletions
diff --git a/main/src/cgeo/geocaching/AbstractPopupActivity.java b/main/src/cgeo/geocaching/AbstractPopupActivity.java index 5b9b509..5f24030 100644 --- a/main/src/cgeo/geocaching/AbstractPopupActivity.java +++ b/main/src/cgeo/geocaching/AbstractPopupActivity.java @@ -108,9 +108,6 @@ public abstract class AbstractPopupActivity extends AbstractActivity implements } @Override - public abstract void navigateTo(); - - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // set theme @@ -202,9 +199,6 @@ public abstract class AbstractPopupActivity extends AbstractActivity implements return super.onTouchEvent(event); } - @Override - public abstract void showNavigationMenu(); - protected abstract void startDefaultNavigation2(); protected final void addCacheDetails() { diff --git a/main/src/cgeo/geocaching/DirectionProvider.java b/main/src/cgeo/geocaching/DirectionProvider.java index b4fb86c..ae58fed 100644 --- a/main/src/cgeo/geocaching/DirectionProvider.java +++ b/main/src/cgeo/geocaching/DirectionProvider.java @@ -3,6 +3,8 @@ package cgeo.geocaching; import cgeo.geocaching.compatibility.Compatibility; import cgeo.geocaching.utils.MemorySubject; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import android.app.Activity; import android.content.Context; import android.hardware.Sensor; @@ -54,6 +56,7 @@ public class DirectionProvider extends MemorySubject<Float> implements SensorEve } @Override + @SuppressFBWarnings("FE_FLOATING_POINT_EQUALITY") public void onSensorChanged(final SensorEvent event) { final float direction = event.values[0]; if (direction != previous) { diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index c589e9b..2da93bc 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -32,6 +32,8 @@ import cgeo.geocaching.utils.LogTemplateProvider.LogContext; import cgeo.geocaching.utils.MatcherWrapper; import cgeo.geocaching.utils.UncertainProperty; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.Predicate; import org.apache.commons.lang3.BooleanUtils; @@ -366,6 +368,7 @@ public class Geocache implements ICache, IWaypoint { * the other cache to compare this one to * @return true if both caches have the same content */ + @SuppressFBWarnings("FE_FLOATING_POINT_EQUALITY") private boolean isEqualTo(final Geocache other) { return detailed == other.detailed && StringUtils.equalsIgnoreCase(geocode, other.geocode) && diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java index 1d4c22c..f5d19df 100644 --- a/main/src/cgeo/geocaching/MainActivity.java +++ b/main/src/cgeo/geocaching/MainActivity.java @@ -668,7 +668,7 @@ public class MainActivity extends AbstractActivity { wait(500); checks++; } catch (Exception e) { - // nothing; + Log.e("MainActivity.CountBubbleUpdateThread.run", e); } if (checks > 10) { diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index 41f622f..98deb07 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -1310,9 +1310,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto protected DoRunnable(final Viewport viewport) { this.viewport = viewport; } - - @Override - public abstract void run(); } /** @@ -1479,7 +1476,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto mapController.setCenter(mapItemFactory.getGeoPointBase(new Geopoint(mapState[0] / 1.0e6, mapState[1] / 1.0e6))); mapController.setZoom(mapState[2]); } catch (RuntimeException e) { - // nothing at all + Log.e("centermap", e); } centered = true; @@ -1503,7 +1500,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto mapController.zoomToSpan((int) (viewport.getLatitudeSpan() * 1e6), (int) (viewport.getLongitudeSpan() * 1e6)); } } catch (RuntimeException e) { - // nothing at all + Log.e("centermap", e); } centered = true; @@ -1512,7 +1509,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto try { mapController.setCenter(makeGeoPoint(coordsCenter)); } catch (Exception e) { - // nothing at all + Log.e("centermap", e); } centered = true; diff --git a/main/src/cgeo/geocaching/settings/TemplateTextPreference.java b/main/src/cgeo/geocaching/settings/TemplateTextPreference.java index 9eaaa67..a703231 100644 --- a/main/src/cgeo/geocaching/settings/TemplateTextPreference.java +++ b/main/src/cgeo/geocaching/settings/TemplateTextPreference.java @@ -48,7 +48,7 @@ public class TemplateTextPreference extends DialogPreference { settingsActivity = (SettingsActivity) this.getContext(); editText = (EditText) view.findViewById(R.id.signature_dialog_text); - editText.setText(getPersistedString(initialValue != null ? initialValue.toString() : StringUtils.EMPTY)); + editText.setText(getPersistedString(initialValue != null ? initialValue : StringUtils.EMPTY)); Button button = (Button) view.findViewById(R.id.signature_templates); button.setOnClickListener(new View.OnClickListener() { diff --git a/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java b/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java index 55b153b..568119e 100644 --- a/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java +++ b/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java @@ -2,6 +2,8 @@ package cgeo.geocaching.ui; import cgeo.geocaching.activity.AbstractViewPagerActivity.PageViewCreator; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import android.os.Bundle; import android.view.View; @@ -29,6 +31,7 @@ public abstract class AbstractCachingPageViewCreator<ViewClass extends View> imp } @Override + @SuppressFBWarnings("USM_USELESS_ABSTRACT_METHOD") public abstract ViewClass getDispatchedView(); /** diff --git a/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java b/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java index fc5ebe6..8660a7b 100644 --- a/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java +++ b/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java @@ -1,5 +1,7 @@ package cgeo.geocaching.ui.dialog; +import cgeo.geocaching.utils.Log; + import android.app.Dialog; import android.content.Context; import android.os.Bundle; @@ -24,7 +26,7 @@ public abstract class NoTitleDialog extends Dialog { requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); } catch (final Exception e) { - // nothing + Log.e("NoTitleDialog.onCreate", e); } } } diff --git a/main/src/cgeo/geocaching/utils/MatcherWrapper.java b/main/src/cgeo/geocaching/utils/MatcherWrapper.java index 78b1170..c99d3c4 100644 --- a/main/src/cgeo/geocaching/utils/MatcherWrapper.java +++ b/main/src/cgeo/geocaching/utils/MatcherWrapper.java @@ -1,5 +1,7 @@ package cgeo.geocaching.utils; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -44,6 +46,7 @@ public class MatcherWrapper { * @param input * @return */ + @SuppressFBWarnings("DM_STRING_CTOR") private static String newString(String input) { if (input == null) { return null; diff --git a/main/src/cgeo/geocaching/utils/TextUtils.java b/main/src/cgeo/geocaching/utils/TextUtils.java index 14caf1d..efbb2d7 100644 --- a/main/src/cgeo/geocaching/utils/TextUtils.java +++ b/main/src/cgeo/geocaching/utils/TextUtils.java @@ -3,6 +3,8 @@ */ package cgeo.geocaching.utils; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import org.eclipse.jdt.annotation.Nullable; import java.util.regex.Matcher; @@ -36,6 +38,7 @@ public final class TextUtils { * Find the last occurring value * @return defaultValue or the n-th group if the pattern matches (trimmed if wanted) */ + @SuppressFBWarnings("DM_STRING_CTOR") public static String getMatch(@Nullable final String data, final Pattern p, final boolean trim, final int group, final String defaultValue, final boolean last) { if (data != null) { |
