GitLab wurde erfolgreich aktualisiert. Durch regelmäßige Updates bleibt das THM GitLab sicher. Danke für Ihre Geduld.

Commit 3a4b5c2b authored by Julian Hochstetter's avatar Julian Hochstetter

update couchdb4j dependency ezmorpher to more recent version 1.0.6 which

doesnt throw exceptions if fields are not set. remove info output
parent b4d78532
......@@ -204,6 +204,12 @@
<groupId>couchdb4j</groupId>
<artifactId>couchdb4j</artifactId>
<version>0.3.0-i386-1</version>
</dependency>
<dependency>
<groupId>net.sf.ezmorph</groupId>
<artifactId>ezmorph</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
......
......@@ -117,7 +117,6 @@ public class SessionController {
response.setStatus(HttpStatus.NOT_FOUND.value());
return null;
}
logger.info(questions.toString());
return questions;
}
......
......@@ -195,9 +195,9 @@ public class CouchDBDao implements IDatabaseDao {
ViewResults questions = this.getDatabase().view(view);
List<Question> result = new ArrayList<Question>();
logger.info(questions.toString());
MorpherRegistry morpherRegistry = JSONUtils.getMorpherRegistry();
Morpher dynaMorpher = new BeanMorpher(PossibleAnswer.class, morpherRegistry);
Morpher dynaMorpher = new BeanMorpher(PossibleAnswer.class, morpherRegistry);
morpherRegistry.registerMorpher(dynaMorpher);
for (Document d : questions.getResults()) {
Question q = (Question) JSONObject.toBean(d.getJSONObject().getJSONObject("value"), Question.class);
......
......@@ -32,6 +32,7 @@ public class Question {
private boolean noCorrect;
private String session;
private int number;
private int duration;
public String getType() {
......@@ -122,6 +123,14 @@ public class Question {
this.number = number;
}
public int getDuration() {
return duration;
}
public void setDuration(int duration) {
this.duration = duration;
}
@Override
public String toString() {
return "Question type '" + this.questionType + "': " + this.subject + ";\n" + this.text +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment