diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-12-23 17:11:57 -0800 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-12-23 17:11:57 -0800 |
commit | 9b132013565b702576e5e883d3d732f2b590e244 (patch) | |
tree | 027bc95587d477ca993b8e24170ea7b38fb35c1d /java | |
parent | 5e3916050c9d1ab528589eb4e45e4e1151609cd0 (diff) | |
download | flatbuffers-9b132013565b702576e5e883d3d732f2b590e244.tar.gz flatbuffers-9b132013565b702576e5e883d3d732f2b590e244.tar.bz2 flatbuffers-9b132013565b702576e5e883d3d732f2b590e244.zip |
Fixed warnings in FlexBuffers.java
- Missing return statement <- bug!
- Missing hashCode function.
Change-Id: I6333cac72adf8ead92ab2e6c7215650ce4571a73
Diffstat (limited to 'java')
-rw-r--r-- | java/com/google/flatbuffers/FlexBuffers.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/com/google/flatbuffers/FlexBuffers.java b/java/com/google/flatbuffers/FlexBuffers.java index e0eb37b7..0605c1b2 100644 --- a/java/com/google/flatbuffers/FlexBuffers.java +++ b/java/com/google/flatbuffers/FlexBuffers.java @@ -244,7 +244,7 @@ public class FlexBuffers { public boolean isNull() { return type == FBT_NULL; } - + /** * Checks whether the element is boolean type * @return true if boolean type @@ -393,7 +393,7 @@ public class FlexBuffers { case FBT_NULL: return 0; case FBT_STRING: return Long.parseLong(asString()); case FBT_VECTOR: return asVector().size(); - case FBT_BOOL: readInt(bb, end, parentWidth); + case FBT_BOOL: return readInt(bb, end, parentWidth); default: // Convert other things to uint. return 0; @@ -792,6 +792,10 @@ public class FlexBuffers { return ((Key) obj).end == end && ((Key) obj).byteWidth == byteWidth; } + + public int hashCode() { + return end ^ byteWidth; + } } /** |