Ticket #5303: 0004-Whitespace.patch

File 0004-Whitespace.patch, 4.7 KB (added by Matthew Bell, 11 years ago)
  • src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    From 42a4454fba42b259736d267f9d860542fa937179 Mon Sep 17 00:00:00 2001
    From: Matthew W. S. Bell <matthew@bells23.org.uk>
    Date: Sat, 7 Aug 2010 01:00:22 +0100
    Subject: [PATCH 4/4] Whitespace
    
    ---
     .../openstreetmap/josm/data/osm/DataSetMerger.java |   18 +++++++++---------
     1 files changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/src/org/openstreetmap/josm/data/osm/DataSetMerger.java b/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
    index e1d8f30..a76a7ec 100644
    a b public class DataSetMerger { 
    9292            // yet but which is equal in its semantic attributes
    9393            //
    9494            Collection<? extends OsmPrimitive> candidates = null;
    95             switch(source.getType()) {
     95            switch (source.getType()) {
    9696            case NODE: candidates = targetDataSet.getNodes(); break;
    97             case WAY: candidates  =targetDataSet.getWays(); break;
     97            case WAY: candidates  = targetDataSet.getWays(); break;
    9898            case RELATION: candidates = targetDataSet.getRelations(); break;
    9999            default: throw new AssertionError();
    100100            }
    public class DataSetMerger { 
    132132        objectsWithChildrenToMerge.add(source.getPrimitiveId());
    133133    }
    134134
    135     protected OsmPrimitive getMergeTarget(OsmPrimitive mergeSource) throws IllegalStateException{
     135    protected OsmPrimitive getMergeTarget(OsmPrimitive mergeSource) throws IllegalStateException {
    136136        PrimitiveId targetId = mergedMap.get(mergeSource.getPrimitiveId());
    137137        if (targetId == null)
    138138            return null;
    public class DataSetMerger { 
    256256            // target and source are incomplete. Doesn't matter which one to
    257257            // take. We take target.
    258258            //
    259         } else if (target.isDeleted() && ! source.isDeleted() && target.getVersion() == source.getVersion()) {
     259        } else if (target.isDeleted() && !source.isDeleted() && target.getVersion() == source.getVersion()) {
    260260            // same version, but target is deleted. Assume target takes precedence
    261261            // otherwise too many conflicts when refreshing from the server
    262262            // but, if source has a referrer that is not in the target dataset there is a conflict
    public class DataSetMerger { 
    273273            // happen if one layer is merged onto another layer
    274274            //
    275275            conflicts.add(target,source);
    276         } else if (! target.isModified() && source.isModified()) {
     276        } else if (!target.isModified() && source.isModified()) {
    277277            // target not modified. We can assume that source is the most recent version.
    278278            // clone it into target. But check first, whether source is deleted. if so,
    279279            // make sure that target is not referenced any more in myDataSet. If it is there
    public class DataSetMerger { 
    286286                target.mergeFrom(source);
    287287                objectsWithChildrenToMerge.add(source.getPrimitiveId());
    288288            }
    289         } else if (! target.isModified() && !source.isModified() && target.getVersion() == source.getVersion()) {
     289        } else if (!target.isModified() && !source.isModified() && target.getVersion() == source.getVersion()) {
    290290            // both not modified. Merge nevertheless.
    291291            // This helps when updating "empty" relations, see #4295
    292292            target.mergeFrom(source);
    293293            objectsWithChildrenToMerge.add(source.getPrimitiveId());
    294         } else if (! target.isModified() && !source.isModified() && target.getVersion() < source.getVersion()) {
     294        } else if (!target.isModified() && !source.isModified() && target.getVersion() < source.getVersion()) {
    295295            // my not modified but other is newer. clone other onto mine.
    296296            //
    297297            target.mergeFrom(source);
    298298            objectsWithChildrenToMerge.add(source.getPrimitiveId());
    299         } else if (target.isModified() && ! source.isModified() && target.getVersion() == source.getVersion()) {
     299        } else if (target.isModified() && !source.isModified() && target.getVersion() == source.getVersion()) {
    300300            // target is same as source but target is modified
    301301            // => keep target and reset modified flag if target and source are semantically equal
    302302            if (target.hasEqualSemanticAttributes(source)) {
    303303                target.setModified(false);
    304304            }
    305         } else if (! target.hasEqualSemanticAttributes(source)) {
     305        } else if (!target.hasEqualSemanticAttributes(source)) {
    306306            // target is modified and is not semantically equal with source. Can't automatically
    307307            // resolve the differences
    308308            // =>  create a conflict