From de70dec44a5ca60c4ed52946a340a49f32153991 Mon Sep 17 00:00:00 2001 From: Emux Date: Thu, 14 Dec 2023 18:46:25 +0200 Subject: [PATCH] Fix some Lint issues --- .../src/main/java/btools/mapaccess/WaypointMatcherImpl.java | 2 +- .../src/main/java/btools/routingapp/BRouterService.java | 1 + .../src/main/java/btools/routingapp/BRouterWorker.java | 1 + brouter-util/src/main/java/btools/util/CompactLongMap.java | 2 ++ brouter-util/src/main/java/btools/util/SortedHeap.java | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/brouter-mapaccess/src/main/java/btools/mapaccess/WaypointMatcherImpl.java b/brouter-mapaccess/src/main/java/btools/mapaccess/WaypointMatcherImpl.java index e70d3be..85ab9b5 100644 --- a/brouter-mapaccess/src/main/java/btools/mapaccess/WaypointMatcherImpl.java +++ b/brouter-mapaccess/src/main/java/btools/mapaccess/WaypointMatcherImpl.java @@ -51,7 +51,7 @@ public final class WaypointMatcherImpl implements WaypointMatcher { } // sort result list - comparator = new Comparator<>() { + comparator = new Comparator() { @Override public int compare(MatchedWaypoint mw1, MatchedWaypoint mw2) { int cmpDist = Double.compare(mw1.radius, mw2.radius); diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BRouterService.java b/brouter-routing-app/src/main/java/btools/routingapp/BRouterService.java index 90b875c..1bb72af 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BRouterService.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BRouterService.java @@ -271,6 +271,7 @@ public class BRouterService extends Service { } } + @SuppressWarnings("deprecation") private void logBundle(Bundle params) { if (AppLogger.isLogging()) { for (String k : params.keySet()) { diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BRouterWorker.java b/brouter-routing-app/src/main/java/btools/routingapp/BRouterWorker.java index 64e73d5..f7a74ff 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BRouterWorker.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BRouterWorker.java @@ -36,6 +36,7 @@ public class BRouterWorker { public List nogoPolygonsList; public String profileParams; + @SuppressWarnings("deprecation") public String getTrackFromParams(Bundle params) { int engineMode = 0; diff --git a/brouter-util/src/main/java/btools/util/CompactLongMap.java b/brouter-util/src/main/java/btools/util/CompactLongMap.java index b29d83a..49efc08 100644 --- a/brouter-util/src/main/java/btools/util/CompactLongMap.java +++ b/brouter-util/src/main/java/btools/util/CompactLongMap.java @@ -224,6 +224,7 @@ public class CompactLongMap { // does sorted array "a" contain "id" ? + @SuppressWarnings("unchecked") private boolean contains(int idx, long id, boolean doPut) { long[] a = al[idx]; int offset = a.length; @@ -243,6 +244,7 @@ public class CompactLongMap { return false; } + @SuppressWarnings("unchecked") protected void moveToFrozenArrays(long[] faid, List flv) { for (int i = 1; i < MAXLISTS; i++) { pa[i] = 0; diff --git a/brouter-util/src/main/java/btools/util/SortedHeap.java b/brouter-util/src/main/java/btools/util/SortedHeap.java index 3f2c4f1..b350d63 100644 --- a/brouter-util/src/main/java/btools/util/SortedHeap.java +++ b/brouter-util/src/main/java/btools/util/SortedHeap.java @@ -19,6 +19,7 @@ public final class SortedHeap { /** * @return the lowest key value, or null if none */ + @SuppressWarnings("unchecked") public V popLowestKeyValue() { SortedBin bin = firstNonEmpty; if (firstNonEmpty == null) {