Support unrecognized properties.

This commit is contained in:
Moxie Marlinspike 2014-06-29 18:16:43 -07:00
parent 40529dc41f
commit 885af064c9
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ package org.whispersystems.textsecuregcm;
import com.codahale.metrics.SharedMetricRegistries;
import com.codahale.metrics.graphite.GraphiteReporter;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.google.common.base.Optional;
import net.spy.memcached.MemcachedClient;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
@ -112,6 +113,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
throws Exception
{
SharedMetricRegistries.add(Constants.METRICS_NAME, environment.metrics());
environment.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
DBIFactory dbiFactory = new DBIFactory();
DBI jdbi = dbiFactory.build(environment, config.getDataSourceFactory(), "postgresql");

View File

@ -84,7 +84,6 @@ public class KeysController {
@Timed
@GET
@Path("/")
@Produces(MediaType.APPLICATION_JSON)
public PreKeyStatus getStatus(@Auth Account account) {
int count = keys.getCount(account.getNumber(), account.getAuthenticatedDevice().get().getId());