src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Remove any elements in API storage that haven't been changed
     * 
     * This shouldn't be necessary and indicates that there is something which doesn't correctly remove elements.
     */
Remove any elements in API storage that haven't been changed

This shouldn't be necessary and indicates that there is something which doesn't correctly remove elements.
Remove any elements in API storage that haven ' t been changed This shouldn ' t be necessary and indicates that there is something which doesn ' t correctly remove elements .
private void removeUnchanged() {
        for (Node node : new ArrayList<>(apiStorage.getNodes())) {
            if (node.getState() == OsmElement.STATE_UNCHANGED) {
                apiStorage.removeNode(node);
                Log.e(DEBUG_TAG, "Node " + node.getOsmId() + " was unchanged in API");
            }
        }
        for (Way way : new ArrayList<>(apiStorage.getWays())) {
            if (way.getState() == OsmElement.STATE_UNCHANGED) {
                apiStorage.removeWay(way);
                Log.e(DEBUG_TAG, "Way " + way.getOsmId() + " was unchanged in API");
            }
        }
        for (Relation relation : new ArrayList<>(apiStorage.getRelations())) {
            if (relation.getState() == OsmElement.STATE_UNCHANGED) {
                apiStorage.removeRelation(relation);
                Log.e(DEBUG_TAG, "Relation " + relation.getOsmId() + " was unchanged in API");
            }
        }
    }
private void removeUnchanged ( ) { for ( Node node : new ArrayList < > ( apiStorage . getNodes ( ) ) ) { if ( node . getState ( ) == OsmElement . STATE_UNCHANGED ) { apiStorage . removeNode ( node ) ; Log . e ( DEBUG_TAG , "Node " + node . getOsmId ( ) + " was unchanged in API" ) ; } } for ( Way way : new ArrayList < > ( apiStorage . getWays ( ) ) ) { if ( way . getState ( ) == OsmElement . STATE_UNCHANGED ) { apiStorage . removeWay ( way ) ; Log . e ( DEBUG_TAG , "Way " + way . getOsmId ( ) + " was unchanged in API" ) ; } } for ( Relation relation : new ArrayList < > ( apiStorage . getRelations ( ) ) ) { if ( relation . getState ( ) == OsmElement . STATE_UNCHANGED ) { apiStorage . removeRelation ( relation ) ; Log . e ( DEBUG_TAG , "Relation " + relation . getOsmId ( ) + " was unchanged in API" ) ; } } }
Remove any elements in API storage that haven't been changed
Remove any elements in API storage that haven ' t been changed