From d905609da8d8ccb489adb8baaee00405201ae8d1 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 28 Jun 2007 14:13:27 +0000 Subject: [PATCH] added check for 'broken update' - where vamsas document file has been incorrectly written. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@409 be28352e-c001-0410-b1a7-c7978e42abec --- src/uk/ac/vamsas/test/ExampleApplication.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/uk/ac/vamsas/test/ExampleApplication.java b/src/uk/ac/vamsas/test/ExampleApplication.java index 3ac5cd3..bfb1425 100644 --- a/src/uk/ac/vamsas/test/ExampleApplication.java +++ b/src/uk/ac/vamsas/test/ExampleApplication.java @@ -68,6 +68,7 @@ public class ExampleApplication private boolean isFinalizing = false; private int totalUpdates = 9; private uk.ac.vamsas.client.VorbaId recover = null; + private int calls=0; private void processVamsasDocument(IClientDocument doc) { if (doc.getVamsasRoots().length<4) { @@ -114,6 +115,11 @@ public class ExampleApplication try { IClientDocument cdoc = vorbaclient.getClientDocument(); + if (calls>2 && cdoc.getVamsasRoots().length>0 && !cdoc.getVamsasRoots()[0].is__stored_in_document()) + { + System.err.println("Pathological Update Detected - Document is zeroed!"); + } + calls++; uk.ac.vamsas.test.simpleclient.ArchiveReports.rootReport( cdoc.getVamsasRoots(), true, System.out); // Simple update -- 1.7.10.2