From 7a9cc1cb082f1695c210f6f6ffd864f7819fe1c4 Mon Sep 17 00:00:00 2001 From: luukkainen Date: Mon, 4 Jun 2012 10:55:35 +0000 Subject: [PATCH] Remove debug messages refs #3138 git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@25097 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../interop/test/GraphComparator.java | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java index 58e2c05..0366df9 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java +++ b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java @@ -52,6 +52,8 @@ import org.simantics.utils.datastructures.Pair; * */ public class GraphComparator { + + private static final boolean DEBUG = false; private Resource r1; private Resource r2; @@ -587,10 +589,7 @@ public class GraphComparator { addComparable(left.getStatements().get(i),right.getStatements().get(i),false); } } - //System.out.println("Compare not implemented"); - } else { - //System.out.println("Compare not implemented"); - } + } } } @@ -847,7 +846,7 @@ public class GraphComparator { break; } else { while (i2 < ss2.size()) { - System.out.println("Compare Statements diff2 " + printStatement(g,ss2.get(i2))); + if (DEBUG) System.out.println("Compare Statements diff2 " + printStatement(g,ss2.get(i2))); addAddition(ss2.get(i2)); i2++; @@ -856,7 +855,7 @@ public class GraphComparator { } } else if (i2 >= ss2.size()) { while (i1 < ss1.size()) { - System.out.println("Compare Statements diff1 " + printStatement(g,ss1.get(i1))); + if (DEBUG) System.out.println("Compare Statements diff1 " + printStatement(g,ss1.get(i1))); addDeletion(ss1.get(i1)); i1++; } @@ -871,13 +870,13 @@ public class GraphComparator { i2+=same2; } else if (c < 0) { for (int i = 0; i < same1; i++) { - System.out.println("Compare Statements diff1 " + printStatement(g,ss1.get(i+i1))); + if (DEBUG) System.out.println("Compare Statements diff1 " + printStatement(g,ss1.get(i+i1))); addDeletion(ss1.get(i+i1)); } i1 += same1; } else { for (int i = 0; i < same2; i++) { - System.out.println("Compare Statements diff2 " + printStatement(g,ss2.get(i+i2))); + if (DEBUG) System.out.println("Compare Statements diff2 " + printStatement(g,ss2.get(i+i2))); addAddition(ss2.get(i+i2)); } @@ -979,8 +978,6 @@ public class GraphComparator { Statement s2 = ss2.get(i2+off2); if (objectsLeft != null) { - if (s1.getObject().getResourceId() == 52825217 || s1.getObject().getResourceId() == 52825127) - System.out.println(); objectsLeft.add(s1.getObject()); objectsRight.add(s2.getObject()); } @@ -1029,13 +1026,13 @@ public class GraphComparator { } for (int i1 = off1; i1 < off1 + len1; i1++) { if (!used1[i1-off1]) { - System.out.println("Compare Object diff1 " + printStatement(g,ss1.get(i1))); + if (DEBUG) System.out.println("Compare Object diff1 " + printStatement(g,ss1.get(i1))); addDeletion(ss1.get(i1)); } } for (int i2 = off2; i2 < off2 + len2; i2++) { if (!used2[i2-off2]) { - System.out.println("Compare Object diff2 " + printStatement(g,ss2.get(i2))); + if (DEBUG) System.out.println("Compare Object diff2 " + printStatement(g,ss2.get(i2))); addAddition(ss2.get(i2)); } } @@ -1052,7 +1049,7 @@ public class GraphComparator { * @throws ValidationException */ private void compareProps(Resource r1, Resource r2) throws DatabaseException { - System.out.println("compareProps " + r1 + " " + NameUtils.getSafeName(g, r1) + " " + r2 + " " + NameUtils.getSafeName(g, r2)); + if (DEBUG) System.out.println("compareProps " + r1 + " " + NameUtils.getSafeName(g, r1) + " " + r2 + " " + NameUtils.getSafeName(g, r2)); ArrayList ss1 = new ArrayList(); ArrayList ss2 = new ArrayList(); ss1.addAll(g.getStatements(r1, b.HasProperty)); @@ -1068,7 +1065,7 @@ public class GraphComparator { break; else { while (i2 < ss2.size()) { - System.out.println("Compare Prop diff2 " + printStatement(g,ss2.get(i2))); + if (DEBUG) System.out.println("Compare Prop diff2 " + printStatement(g,ss2.get(i2))); addAddition(ss2.get(i2)); i2++; } @@ -1076,7 +1073,7 @@ public class GraphComparator { } } else if (i2 >= ss2.size()) { while (i1 < ss1.size()) { - System.out.println("Compare Prop diff1 " + printStatement(g,ss1.get(i1))); + if (DEBUG) System.out.println("Compare Prop diff1 " + printStatement(g,ss1.get(i1))); addDeletion(ss1.get(i1)); i1++; } @@ -1116,14 +1113,14 @@ public class GraphComparator { break; } case -1:{ - System.out.println("Compare Prop diff1s " + printStatement(g,s1)); + if (DEBUG) System.out.println("Compare Prop diff1s " + printStatement(g,s1)); addDeletion(s1); i1++; break; } case 1:{ - System.out.println("Compare Prop diff2s " + printStatement(g,s2)); + if (DEBUG) System.out.println("Compare Prop diff2s " + printStatement(g,s2)); addAddition(s2); i2++; break; -- 2.47.1