fix bug on status comparison
authorBruno Sinou <bsinou@argeo.org>
Mon, 25 Mar 2013 12:19:23 +0000 (12:19 +0000)
committerBruno Sinou <bsinou@argeo.org>
Mon, 25 Mar 2013 12:19:23 +0000 (12:19 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@6212 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/JcrTestResult.java

index 0b419ccd7cad8e587d3e98c6f30bc76f1ecf9bac..e3394e05cbbda6ecbcd8c11800487512d5b86e2b 100644 (file)
@@ -138,12 +138,12 @@ public class JcrTestResult implements TestResult, SlcNames, AttachmentsEnabled {
                        // add the new result part, retrieving status information
                        Node resultPartNode = node.addNode(SlcNames.SLC_RESULT_PART,
                                        SlcTypes.SLC_CHECK);
-                       resultPartNode.setProperty(SLC_SUCCESS,
-                                       testResultPart.getStatus() == TestStatus.PASSED);
+                       resultPartNode.setProperty(SLC_SUCCESS, testResultPart.getStatus()
+                                       .equals(TestStatus.PASSED));
                        if (testResultPart.getMessage() != null)
                                resultPartNode.setProperty(SLC_MESSAGE,
                                                testResultPart.getMessage());
-                       if (testResultPart.getStatus() == TestStatus.ERROR) {
+                       if (testResultPart.getStatus().equals(TestStatus.ERROR)) {
                                resultPartNode.setProperty(SLC_ERROR_MESSAGE,
                                                (testResultPart.getExceptionMessage() == null) ? ""
                                                                : testResultPart.getExceptionMessage());