From 943d702ea9685b467f1b796c9b6efd0506a0fb56 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer <paul-christian.volkmer@mni.thm.de> Date: Thu, 18 Oct 2012 09:03:53 +0200 Subject: [PATCH] Fixed wrong handling of nonexisting feedback entries If some kinds of feedback values do not exist do not throw the exception NotFoundException. This only indicates, that these values should be '0' which is the default value. NotFoundException should only be thrown if the requested session of feedback does not exist. Every session has a feedback - sometimes with only 0 values. --- src/main/java/de/thm/arsnova/dao/CouchDBDao.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java index e2fe3e7ea..7d9a4c09b 100644 --- a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java +++ b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java @@ -322,7 +322,12 @@ public class CouchDBDao implements IDatabaseDao { .getInt("value"); } } catch (Exception e) { - throw new NotFoundException(); + return new Feedback( + values[0], + values[1], + values[2], + values[3] + ); } return new Feedback( -- GitLab