X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2Flru%2FClusterUpdateOperation.java;h=254fbf55c10cf121f16479261534894d86e4f51b;hp=c23821b7973c51b8e0a8828c7fc66b3e894c4d08;hb=33b349001037197a526a49e5820f0317dc74d934;hpb=18211711f14cc26e828f7c35420eabde871a336a diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterUpdateOperation.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterUpdateOperation.java index c23821b79..254fbf55c 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterUpdateOperation.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterUpdateOperation.java @@ -4,10 +4,7 @@ import org.simantics.acorn.ClusterManager; import org.simantics.acorn.cluster.ClusterImpl; import org.simantics.acorn.exception.AcornAccessVerificationException; import org.simantics.acorn.exception.IllegalAcornStateException; -import org.simantics.acorn.internal.ClusterChange; -import org.simantics.acorn.internal.ClusterChange2; import org.simantics.acorn.internal.ClusterUpdateProcessor; -import org.simantics.acorn.internal.ClusterUpdateProcessor2; import org.simantics.db.service.Bytes; import org.simantics.db.service.ClusterUID; @@ -59,22 +56,11 @@ final public class ClusterUpdateOperation { } public void runWithData(byte[] data) throws IllegalAcornStateException, AcornAccessVerificationException { - try { - int version = Bytes.readLE4(data, 4); - if(version == ClusterChange.VERSION) { - ClusterUpdateProcessor processor = new ClusterUpdateProcessor(manager, manager.support, data, this); - ClusterImpl cluster = info.getForUpdate(); - cluster = processor.process(cluster); - manager.update(uid, cluster); - } else if (version == ClusterChange2.VERSION) { - ClusterUpdateProcessor2 processor = new ClusterUpdateProcessor2(manager.support, data, this); - ClusterImpl cluster = info.getForUpdate(); - processor.process(cluster); - manager.update(uid, cluster); - } else { - throw new IllegalAcornStateException("unsupported clusterChange version " + version); - } + ClusterUpdateProcessor processor = new ClusterUpdateProcessor(manager, manager.support, data, this); + ClusterImpl cluster = info.getForUpdate(); + cluster = processor.process(cluster); + manager.update(uid, cluster); } catch (IllegalAcornStateException | AcornAccessVerificationException e) { throw e; } catch (Throwable t) {