Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue 105 #62

Closed
wants to merge 2 commits into from

3 participants

@bwaite-bfly

I updated the codebase to use readLong()
instead of readInt(). Updated corresponding datatypes and return
types. I also ran a few load tests in the single_node config using
the performance tool. All seemed to run okay. My background is C, C+

  • and python. I am a newbie to open source and wanted to increase my java skills. Please feel to review and give any feedback. I appreciate the honesty.

Bob

Robert Waite added some commits
@afeinberg
Collaborator

Have you ran all the unit tests after this?

Thanks,

  • Alex
@bwaite-bfly
@bwaite-bfly

I have not heard back on this. Let me know if there is something I need to do in my environment.

Thanks.

Bob

@afeinberg
Collaborator
@bwaite-bfly

No problem. I am testing on a Mac (Lion) running java version "1.6.0_29".

@vinothchandar
Collaborator

Hi, do you still have trouble with the unit tests?

@bwaite-bfly
@vinothchandar
Collaborator

Please reopen when ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 28, 2011
  1. Updated int to long

    Robert Waite authored
  2. Removed readInt

    Robert Waite authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/java/voldemort/serialization/json/JsonReader.java
View
12 src/java/voldemort/serialization/json/JsonReader.java
@@ -248,14 +248,14 @@ else if('A' <= current() && 'F' >= current())
public Number readNumber() {
skipWhitespace();
- int intPiece = readInt();
+ long longPiece = readLong();
// if int is all we have, return it
if(isTerminator(current()))
- return intPiece;
+ return longPiece;
// okay its a double, check for exponent
- double doublePiece = intPiece;
+ double doublePiece = longPiece;
if(current() == '.')
doublePiece += readFraction();
if(current() == 'e' || current() == 'E') {
@@ -276,9 +276,9 @@ private boolean isTerminator(int ch) {
|| ch == ',' || ch == -1;
}
- public int readInt() {
+ public long readLong() {
skipWhitespace();
- int val = 0;
+ long val = 0;
boolean isPositive;
if(current() == '-') {
isPositive = false;
@@ -307,6 +307,8 @@ public int readInt() {
return val;
}
+
+
public double readFraction() {
skip('.');
double position = 0.1;
Something went wrong with that request. Please try again.