Skip to content

Commit

Permalink
Apply JOSM fixup to osmose item 2120 too
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpoole committed Oct 16, 2023
1 parent 60513ea commit 0daf5d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/de/blau/android/tasks/OsmoseBug.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ public final class OsmoseBug extends Bug implements Serializable {
private static final String OSMOSE_SUBTITLE = "subtitle";
private static final String OSMOSE_LEVEL = "level";

// hardwired stuff used to fixup JOSM derivec tests
// hardwired stuff used to fixup JOSM derived tests
private static final String MOUSTACHE_LEFT = "{";
private static final int JOSM_ITEM_HIGH = 9200;
private static final int JOSM_ITEM_LOW = 9000;
private static final int INDOOR_ITEM = 2120;

private String item;
private int bugclass; // class
Expand Down Expand Up @@ -144,12 +145,12 @@ public static List<OsmoseBug> parseBugs(InputStream is) throws IOException, Numb
private static void fixupJosmSourced(@NonNull OsmoseBug bug) {
try {
int item = Integer.parseInt(bug.item);
if (item >= JOSM_ITEM_LOW && item < JOSM_ITEM_HIGH && bug.subtitle != null && bug.getTitle().contains(MOUSTACHE_LEFT)) {
if ((item >= JOSM_ITEM_LOW && item < JOSM_ITEM_HIGH || item == INDOOR_ITEM) && bug.subtitle != null && bug.getTitle().contains(MOUSTACHE_LEFT)) {
bug.setTitle(bug.subtitle);
bug.subtitle = null;
}
} catch (NumberFormatException nfex) {
Log.e(DEBUG_TAG, "Non numberic item " + nfex.getMessage());
Log.e(DEBUG_TAG, "Non nummeric item " + nfex.getMessage());
}
}

Expand Down

0 comments on commit 0daf5d8

Please sign in to comment.