You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/09/15 13:44:11 UTC

[12/15] incubator-joshua git commit: Fixed failing unit test. Added null check for decoder.

Fixed failing unit test. Added null check for decoder.


Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/7fc205fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/7fc205fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/7fc205fd

Branch: refs/heads/7
Commit: 7fc205fd3ce3dc68639ef0cdd7de784acf62550a
Parents: b09081a
Author: Michael A. Hedderich <mi...@users.noreply.github.com>
Authored: Thu Sep 15 14:34:02 2016 +0200
Committer: Michael A. Hedderich <mi...@users.noreply.github.com>
Committed: Thu Sep 15 14:34:02 2016 +0200

----------------------------------------------------------------------
 .../org/apache/joshua/decoder/cky/UniqueHypothesesTest.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/7fc205fd/src/test/java/org/apache/joshua/decoder/cky/UniqueHypothesesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/joshua/decoder/cky/UniqueHypothesesTest.java b/src/test/java/org/apache/joshua/decoder/cky/UniqueHypothesesTest.java
index 8dc0e56..bf65c5e 100644
--- a/src/test/java/org/apache/joshua/decoder/cky/UniqueHypothesesTest.java
+++ b/src/test/java/org/apache/joshua/decoder/cky/UniqueHypothesesTest.java
@@ -65,8 +65,10 @@ public class UniqueHypothesesTest {
 
   @AfterMethod
   public void tearDown() throws Exception {
-    decoder.cleanUp();
-    decoder = null;
+    if (decoder != null) {
+      decoder.cleanUp();
+      decoder = null;
+    }
   }
 
 }