changeset 27:d7f357434800

the current conflict is an ObjectNode now so there's less need for casts
author dirk
date Sun, 18 Sep 2011 11:27:55 +0200
parents ca9c62a68e87
children 0bed77e3608e
files conflict-editor/src/main/java/de/codedo/conflicteditor/gui/ConflictEditorController.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/conflict-editor/src/main/java/de/codedo/conflicteditor/gui/ConflictEditorController.java	Sun Sep 18 11:00:16 2011 +0200
+++ b/conflict-editor/src/main/java/de/codedo/conflicteditor/gui/ConflictEditorController.java	Sun Sep 18 11:27:55 2011 +0200
@@ -20,7 +20,7 @@
 public class ConflictEditorController extends Object
 {
     private CouchDb _database;
-    private JsonNode _currentConflict;
+    private ObjectNode _currentConflict;
     private Difference _currentDifference;
 
     public JsonNode findConflicts(String dbUrl) throws IOException
@@ -60,14 +60,14 @@
 
     public void useCurrentValue()
     {
-        JsonNode currentValue = (JsonNode)_currentDifference.currentValue;
-        ((ObjectNode)_currentConflict).put(_currentDifference.key, currentValue);
+        JsonNode value = (JsonNode)_currentDifference.currentValue;
+        _currentConflict.put(_currentDifference.key, value);
     }
 
     public void useConflictValue()
     {
         JsonNode value = (JsonNode)_currentDifference.otherValue;
-        ((ObjectNode)_currentConflict).put(_currentDifference.key, value);
+        _currentConflict.put(_currentDifference.key, value);
     }
 
     public JsonNode getCurrentConflict()