Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-04-26 07:01:28 -0400
committerUwe Stieber2012-04-26 07:04:09 -0400
commit41fe79ec980c1ccee8dd15ee9837b5f394460ac6 (patch)
treebf39f42a78efd8b9c589e8e653ea6a1b4a5dc1d1 /target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence
parent85751a5a421bf03c1e4e97b717d5be9ca4eaec10 (diff)
downloadorg.eclipse.tcf-41fe79ec980c1ccee8dd15ee9837b5f394460ac6.tar.gz
org.eclipse.tcf-41fe79ec980c1ccee8dd15ee9837b5f394460ac6.tar.xz
org.eclipse.tcf-41fe79ec980c1ccee8dd15ee9837b5f394460ac6.zip
Target Explorer: Fix Gson pretty printing
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractGsonMapPersistenceDelegate.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractGsonMapPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractGsonMapPersistenceDelegate.java
index 23bf4defe..50aed6f40 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractGsonMapPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractGsonMapPersistenceDelegate.java
@@ -16,6 +16,8 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
@@ -31,8 +33,6 @@ import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
/**
* AbstractGsonMapPersistenceDelegate
@@ -94,7 +94,7 @@ public abstract class AbstractGsonMapPersistenceDelegate extends ExecutableExten
file = path.addFileExtension(getDefaultFileExtension()).toFile();
}
- JsonWriter writer = new JsonWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); //$NON-NLS-1$
+ Writer writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8"); //$NON-NLS-1$
Gson gson = new GsonBuilder().setPrettyPrinting().create();
gson.toJson(toMap(context), Map.class, writer);
writer.close();
@@ -133,7 +133,7 @@ public abstract class AbstractGsonMapPersistenceDelegate extends ExecutableExten
throw new IOException("URI must denote an absolute file path."); //$NON-NLS-1$
}
- JsonReader reader = new JsonReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); //$NON-NLS-1$
+ Reader reader = new InputStreamReader(new FileInputStream(file), "UTF-8"); //$NON-NLS-1$
data = gson.fromJson(reader, Map.class);
reader.close();
}

Back to the top