Skip to content

Commit

Permalink
2.1.1 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Rieb committed Aug 1, 2016
1 parent af7a43e commit 7ecc15c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.1.1 (2016-08-01)
---------------------------------------------
- Fix "Required field ... missing" deserialization bug caused by certain backwards-compatible response changes from the server.

2.1.0 (2016-07-29)
---------------------------------------------
- Update to latest API specs:
Expand Down
4 changes: 2 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you're using Maven, then edit your project's "pom.xml" and add this to the `<
<dependency>
<groupId>com.dropbox.core</groupId>
<artifactId>dropbox-core-sdk</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</dependency>
```

Expand All @@ -23,7 +23,7 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to
```groovy
dependencies {
// ...
compile 'com.dropbox.core:dropbox-core-sdk:2.1.0'
compile 'com.dropbox.core:dropbox-core-sdk:2.1.1'
}
```

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/dropbox/core/stone/StoneSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ protected static void expectEndArray(JsonParser p) throws IOException, JsonParse

protected static void skipValue(JsonParser p) throws IOException, JsonParseException {
if (p.getCurrentToken().isStructStart()) {
p.skipChildren();
p.skipChildren(); // will leave parser at end token (e.g. '}' or ']')
p.nextToken();
} else if (p.getCurrentToken().isScalarValue()) {
p.nextToken();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ public void testUnknownStructFields() throws Exception {
Dimensions actual = Dimensions.Serializer.INSTANCE.deserialize(json);

assertEquals(actual, expected);

// sometimes the order can matter. Add an unknown struct field early to see if we skip it properly
json = "{\"height\":768,\"foo\":{\"bar\":[1, 2, 3],\"baz\":false},\"alpha\":0.5,\"width\":1024}";
expected = new Dimensions(1024, 768);
actual = Dimensions.Serializer.INSTANCE.deserialize(json);

assertEquals(actual, expected);
}

@Test
Expand Down

0 comments on commit 7ecc15c

Please sign in to comment.