]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
XObject.str() fails the second time it is called. Makes debugging difficult. Get...
authorJeremias Maerki <jeremias@apache.org>
Thu, 6 Jan 2005 09:11:59 +0000 (09:11 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 6 Jan 2005 09:11:59 +0000 (09:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198231 13f79535-47bb-0310-9956-ffa450edef68

test/java/org/apache/fop/layoutengine/EvalCheck.java

index d34dd00c5fcf6a30442389120e588e8d12d5c8cb..ec15fd8f1fc7598088566c94358453b1114d0450 100644 (file)
@@ -63,10 +63,11 @@ public class EvalCheck implements LayoutEngineCheck {
         } catch (TransformerException e) {
             throw new RuntimeException("XPath evaluation failed: " + e.getMessage());
         }
-        if (!expected.equals(res.str())) {
+        String actual = res.str(); //Second str() seems to fail. D'oh!
+        if (!expected.equals(actual)) {
             throw new RuntimeException(
                     "Expected XPath expression to evaluate to '" + expected + "', but got '" 
-                    + res + "' (" + this + ")");
+                    + actual + "' (" + this + ")");
         }
 
     }