Commit afd8ba1c authored by Christoph Thelen's avatar Christoph Thelen

Enforce jackson version; Use our new CouchDB4J fork

parent 334c8f45
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<org.springframework-version>4.0.9.RELEASE</org.springframework-version> <org.springframework-version>4.0.9.RELEASE</org.springframework-version>
<org.springframework.security-version>3.2.5.RELEASE</org.springframework.security-version> <org.springframework.security-version>3.2.5.RELEASE</org.springframework.security-version>
<org.springframework.integration-mail-version>4.0.6.RELEASE</org.springframework.integration-mail-version> <org.springframework.integration-mail-version>4.0.6.RELEASE</org.springframework.integration-mail-version>
<com.fasterxml.jackson-version>2.5.1</com.fasterxml.jackson-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.url>https://scm.thm.de/arsnova</project.url> <project.url>https://scm.thm.de/arsnova</project.url>
<sonar.language>java</sonar.language> <sonar.language>java</sonar.language>
...@@ -272,7 +273,12 @@ ...@@ -272,7 +273,12 @@
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<version>2.4.5</version> <version>${com.fasterxml.jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${com.fasterxml.jackson-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
...@@ -294,12 +300,6 @@ ...@@ -294,12 +300,6 @@
<artifactId>spring-aspects</artifactId> <artifactId>spring-aspects</artifactId>
<version>${org.springframework-version}</version> <version>${org.springframework-version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.42.2</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId> <artifactId>mockito-all</artifactId>
......
...@@ -54,6 +54,8 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -54,6 +54,8 @@ import org.springframework.transaction.annotation.Transactional;
import com.fourspaces.couchdb.Database; import com.fourspaces.couchdb.Database;
import com.fourspaces.couchdb.Document; import com.fourspaces.couchdb.Document;
import com.fourspaces.couchdb.Results;
import com.fourspaces.couchdb.RowResult;
import com.fourspaces.couchdb.View; import com.fourspaces.couchdb.View;
import com.fourspaces.couchdb.ViewResults; import com.fourspaces.couchdb.ViewResults;
...@@ -125,17 +127,14 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware ...@@ -125,17 +127,14 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware
view.setStartKeyArray(user.getUsername()); view.setStartKeyArray(user.getUsername());
view.setEndKeyArray(user.getUsername(), "{}"); view.setEndKeyArray(user.getUsername(), "{}");
final ViewResults sessions = getDatabase().view(view); final Results<Session> results = getDatabase().queryView(view, Session.class);
final List<Session> result = new ArrayList<Session>(); final List<Session> result = new ArrayList<Session>();
for (final Document d : sessions.getResults()) { for (final RowResult<Session> row : results.getRows()) {
final Session session = (Session) JSONObject.toBean( final Session session = row.getValue();
d.getJSONObject().getJSONObject("value"), session.setCreator(row.getKey().getString(0));
Session.class session.setName(row.getKey().getString(1));
); session.set_id(row.getId());
session.setCreator(d.getJSONObject().getJSONArray("key").getString(0));
session.setName(d.getJSONObject().getJSONArray("key").getString(1));
session.set_id(d.getId());
result.add(session); result.add(session);
} }
return result; return result;
......
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