Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 13654)
@@ -239,5 +239,5 @@
             Layer layer = e.getRemovedLayer();
             if (layer instanceof OsmDataLayer) {
-                undoRedo.clean(((OsmDataLayer) layer).data);
+                undoRedo.clean(((OsmDataLayer) layer).getDataSet());
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveDataPaster.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveDataPaster.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveDataPaster.java	(revision 13654)
@@ -83,5 +83,5 @@
             }
         }
-        return new AddPrimitivesCommand(bufferCopy, toSelect, layer.data);
+        return new AddPrimitivesCommand(bufferCopy, toSelect, layer.getDataSet());
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/layer/DuplicateAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/layer/DuplicateAction.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/layer/DuplicateAction.java	(revision 13654)
@@ -55,5 +55,5 @@
             String newName = LayerListTransferHandler.suggestNewLayerName(layer.getName(), MainApplication.getLayerManager().getLayers());
             OsmDataLayer oldLayer = (OsmDataLayer) layer;
-            MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(oldLayer.data), newName, null));
+            MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(oldLayer.getDataSet()), newName, null));
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java	(revision 13654)
@@ -138,5 +138,5 @@
             if (layer instanceof OsmDataLayer) {
                 String newName = suggestNewLayerName(layer.getName(), layerNames);
-                OsmDataLayer newLayer = new OsmDataLayer(new DataSet(((OsmDataLayer) layer).data), newName, null);
+                OsmDataLayer newLayer = new OsmDataLayer(new DataSet(((OsmDataLayer) layer).getDataSet()), newName, null);
                 layers.add(newLayer);
                 layerNames.add(newName);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 13654)
@@ -399,6 +399,5 @@
 
         /**
-         * Merges the primitives in <code>ds</code> to the dataset of the
-         * edit layer
+         * Merges the primitives in <code>ds</code> to the dataset of the edit layer
          *
          * @param ds the data set
@@ -406,5 +405,5 @@
         protected void mergeDataSet(DataSet ds) {
             if (ds != null) {
-                final DataSetMerger visitor = new DataSetMerger(getLayer().data, ds);
+                final DataSetMerger visitor = new DataSetMerger(getLayer().getDataSet(), ds);
                 visitor.merge();
                 if (!visitor.getConflicts().isEmpty()) {
@@ -465,5 +464,5 @@
         protected void mergeDataSet(DataSet dataSet) {
             if (dataSet != null) {
-                final DataSetMerger visitor = new DataSetMerger(getLayer().data, dataSet);
+                final DataSetMerger visitor = new DataSetMerger(getLayer().getDataSet(), dataSet);
                 visitor.merge();
                 if (!visitor.getConflicts().isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 13654)
@@ -161,9 +161,9 @@
             referrers = reader.parseOsm(progressMonitor.createSubTaskMonitor(1, false));
             if (referrers != null) {
-                final DataSetMerger visitor = new DataSetMerger(getLayer().data, referrers);
+                final DataSetMerger visitor = new DataSetMerger(getLayer().getDataSet(), referrers);
                 visitor.merge();
 
                 // copy the merged layer's data source info
-                getLayer().data.addDataSources(referrers.getDataSources());
+                getLayer().getDataSet().addDataSources(referrers.getDataSources());
                 // FIXME: this is necessary because there are dialogs listening
                 // for DataChangeEvents which manipulate Swing components on this thread.
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java	(revision 13654)
@@ -73,5 +73,5 @@
         if (newRelation.getMembersCount() == 0 && !newRelation.hasKeys())
             return;
-        MainApplication.undoRedo.add(new AddCommand(layer.data, newRelation));
+        MainApplication.undoRedo.add(new AddCommand(layer.getDataSet(), newRelation));
 
         // make sure everybody is notified about the changes
@@ -95,5 +95,5 @@
         memberTableModel.applyToRelation(editedRelation);
         Conflict<Relation> conflict = new Conflict<>(editor.getRelation(), editedRelation);
-        MainApplication.undoRedo.add(new ConflictAddCommand(layer.data, conflict));
+        MainApplication.undoRedo.add(new ConflictAddCommand(layer.getDataSet(), conflict));
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 13654)
@@ -619,5 +619,5 @@
         if (oldLayer instanceof OsmDataLayer) {
             OsmDataLayer l = (OsmDataLayer) oldLayer;
-            l.data.removeDataSetListener(this);
+            l.getDataSet().removeDataSetListener(this);
         }
         Layer newLayer = e.getSource().getActiveLayer();
@@ -628,5 +628,5 @@
         }
         OsmDataLayer l = (OsmDataLayer) newLayer;
-        l.data.addDataSetListener(this);
+        l.getDataSet().addDataSetListener(this);
         OsmPrimitive primitive = history != null ? l.data.getPrimitiveById(history.getId(), history.getType()) : null;
         HistoryOsmPrimitive newLatest;
Index: trunk/src/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTask.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTask.java	(revision 13654)
@@ -123,5 +123,5 @@
         GuiHelper.runInEDTAndWait(() -> {
             // Remove the commands from the undo stack
-            MainApplication.undoRedo.clean(uploadDataLayer.data);
+            MainApplication.undoRedo.clean(uploadDataLayer.getDataSet());
             MainApplication.getLayerManager().prepareLayerForUpload(uploadDataLayer);
 
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 13654)
@@ -107,5 +107,5 @@
     public void run() {
         monitor.indeterminateSubTask(tr("Preparing objects to upload ..."));
-        APIDataSet ds = new APIDataSet(layer.data);
+        APIDataSet ds = new APIDataSet(layer.getDataSet());
         try {
             ds.adjustRelationUploadOrder();
Index: trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java	(revision 13654)
@@ -298,5 +298,5 @@
     private void registerNewlayer(OsmDataLayer layer) {
         synchronized (layersLock) {
-            layer.data.addDataSetListener(datasetAdapter);
+            layer.getDataSet().addDataSetListener(datasetAdapter);
             layersInfo.add(new AutosaveLayerInfo<>(layer));
         }
@@ -324,5 +324,5 @@
             synchronized (layersLock) {
                 OsmDataLayer osmLayer = (OsmDataLayer) e.getRemovedLayer();
-                osmLayer.data.removeDataSetListener(datasetAdapter);
+                osmLayer.getDataSet().removeDataSetListener(datasetAdapter);
                 cleanupLayer(osmLayer);
             }
Index: trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java	(revision 13653)
+++ trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java	(revision 13654)
@@ -114,5 +114,5 @@
         public DataSet getPreviousDataSet() {
             if (previousDataLayer != null) {
-                return previousDataLayer.data;
+                return previousDataLayer.getDataSet();
             } else {
                 return null;
@@ -403,5 +403,5 @@
     public synchronized DataSet getEditDataSet() {
         if (dataLayer != null && !dataLayer.isLocked()) {
-            return dataLayer.data;
+            return dataLayer.getDataSet();
         } else {
             return null;
@@ -417,5 +417,5 @@
     public synchronized DataSet getActiveDataSet() {
         if (dataLayer != null) {
-            return dataLayer.data;
+            return dataLayer.getDataSet();
         } else {
             return null;
