]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/TransferableGraphSupportImpl.java
isImmutable can NPE
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / TransferableGraphSupportImpl.java
index 337abcc6fe2d4e4e5fcbc0b878455c8e3a97fdb6..567aedc7c319dc6a87df29d214404e2c421a9f18 100644 (file)
@@ -1,51 +1,51 @@
-package fi.vtt.simantics.procore.internal;\r
-\r
-import java.io.InputStream;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.VirtualGraph;\r
-import org.simantics.db.WriteOnlyGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.impl.graph.WriteGraphImpl;\r
-import org.simantics.db.service.ByteReader;\r
-import org.simantics.db.service.TransferableGraphSupport;\r
-\r
-public class TransferableGraphSupportImpl implements TransferableGraphSupport {\r
-       \r
-       final private SessionImplSocket session;\r
-       \r
-       TransferableGraphSupportImpl(SessionImplSocket session) {\r
-               this.session = session;\r
-       }\r
-\r
-       @Override\r
-       public InputStream getValueStream(ReadGraph graph, Resource resource) {\r
-        return session.getValueStream(null, resource);\r
-       }\r
-       \r
-       @Override\r
-       public byte[] getValue(ReadGraph graph, Resource resource) {\r
-               return session.getValue(null, resource);\r
-       }\r
-       \r
-       @Override\r
-       public void setValue(WriteOnlyGraph graph, Resource resource, VirtualGraph provider, byte[] raw) throws DatabaseException {\r
-               \r
-           WriteGraphImpl impl = (WriteGraphImpl)graph;\r
-           VirtualGraph vg = session.getProvider(provider);\r
-           impl.writeSupport.claimValue(vg, resource, raw);\r
-               \r
-       }\r
-       \r
-       @Override\r
-       public void setValue(WriteOnlyGraph graph, Resource resource, VirtualGraph provider, ByteReader reader, int amount)\r
-               throws DatabaseException {\r
-           \r
-        WriteGraphImpl impl = (WriteGraphImpl)graph;\r
-        VirtualGraph vg = session.getProvider(provider);\r
-        impl.writeSupport.claimValue(vg, resource, reader, amount);\r
-           \r
-       }\r
-\r
-}\r
+package fi.vtt.simantics.procore.internal;
+
+import java.io.InputStream;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.VirtualGraph;
+import org.simantics.db.WriteOnlyGraph;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.impl.graph.WriteGraphImpl;
+import org.simantics.db.service.ByteReader;
+import org.simantics.db.service.TransferableGraphSupport;
+
+public class TransferableGraphSupportImpl implements TransferableGraphSupport {
+       
+       final private SessionImplSocket session;
+       
+       TransferableGraphSupportImpl(SessionImplSocket session) {
+               this.session = session;
+       }
+
+       @Override
+       public InputStream getValueStream(ReadGraph graph, Resource resource) {
+        return session.getValueStream(null, resource);
+       }
+       
+       @Override
+       public byte[] getValue(ReadGraph graph, Resource resource) {
+               return session.getValue(null, resource);
+       }
+       
+       @Override
+       public void setValue(WriteOnlyGraph graph, Resource resource, VirtualGraph provider, byte[] raw) throws DatabaseException {
+               
+           WriteGraphImpl impl = (WriteGraphImpl)graph;
+           VirtualGraph vg = session.getProvider(provider);
+           impl.writeSupport.claimValue(vg, resource, raw);
+               
+       }
+       
+       @Override
+       public void setValue(WriteOnlyGraph graph, Resource resource, VirtualGraph provider, ByteReader reader, int amount)
+               throws DatabaseException {
+           
+        WriteGraphImpl impl = (WriteGraphImpl)graph;
+        VirtualGraph vg = session.getProvider(provider);
+        impl.writeSupport.claimValue(vg, resource, reader, amount);
+           
+       }
+
+}