Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arangodb/java-velocypack
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.13
Choose a base ref
...
head repository: arangodb/java-velocypack
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.0.14
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Nov 3, 2017

  1. prepare snapshot

    mpv1989 committed Nov 3, 2017
    Copy the full SHA
    bdfcf07 View commit details

Commits on Nov 27, 2017

  1. Fix Json parsing of negative long

    mpv1989 committed Nov 27, 2017

    Unverified

    The committer email address is not verified.
    Copy the full SHA
    0a8b2b0 View commit details
  2. prepare release 1.0.14

    mpv1989 committed Nov 27, 2017
    Copy the full SHA
    68774e9 View commit details
Showing with 42 additions and 3 deletions.
  1. +4 −0 ChangeLog
  2. +1 −1 README.md
  3. +1 −1 pom.xml
  4. +1 −1 src/main/java/com/arangodb/velocypack/VPackParser.java
  5. +35 −0 src/test/java/com/arangodb/velocypack/VPackParserTest.java
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v1.0.14 (2017-11-27)
---------------------------
* fixed Json parsing of negative long

v1.0.13 (2017-11-03)
---------------------------
* fixed deserialization of BigDecimal
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ To add the dependency to your project with maven, add the following code to your
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>velocypack</artifactId>
<version>1.0.0</version>
<version>1.0.13</version>
</dependency>
</dependencies>
```
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

<groupId>com.arangodb</groupId>
<artifactId>velocypack</artifactId>
<version>1.0.13</version>
<version>1.0.14</version>
<inceptionYear>2017</inceptionYear>
<packaging>jar</packaging>

2 changes: 1 addition & 1 deletion src/main/java/com/arangodb/velocypack/VPackParser.java
Original file line number Diff line number Diff line change
@@ -283,7 +283,7 @@ private void parse(
} else if (value.isDouble()) {
json.append(value.getAsDouble());
} else if (value.isInt()) {
json.append(value.getAsInt());
json.append(value.getAsLong());
} else if (value.isNumber()) {
json.append(value.getAsNumber());
} else if (value.isDate()) {
35 changes: 35 additions & 0 deletions src/test/java/com/arangodb/velocypack/VPackParserTest.java
Original file line number Diff line number Diff line change
@@ -537,4 +537,39 @@ public void negativeInt() {
assertThat(json, is("-32"));
}

@Test
public void negativeIntAsJson() throws VPackException {
final VPackParser parser = new VPackParser.Builder().build();
final String json = parser.toJson(new VPackBuilder().add(-100).slice());
assertThat(json, is("-100"));
}

@Test
public void negativeIntAsJson2() throws VPackException {
final VPackParser parser = new VPackParser.Builder().build();
final String json = parser.toJson(new VPackBuilder().add(-300).slice());
assertThat(json, is("-300"));
}

@Test
public void negativeLongAsJson() throws VPackException {
final VPackParser parser = new VPackParser.Builder().build();
final String json = parser.toJson(new VPackBuilder().add(-100L).slice());
assertThat(json, is("-100"));
}

@Test
public void negativeLongAsJson2() throws VPackException {
final VPackParser parser = new VPackParser.Builder().build();
final String json = parser.toJson(new VPackBuilder().add(-300L).slice());
assertThat(json, is("-300"));
}

@Test
public void negativeLongAsJson3() throws VPackException {
final VPackParser parser = new VPackParser.Builder().build();
final String json = parser.toJson(new VPackBuilder().add(-62135596800L).slice());
assertThat(json, is("-62135596800"));
}

}