Fixed warnings in FlexBuffers.java
- Missing return statement <- bug! - Missing hashCode function. Change-Id: I6333cac72adf8ead92ab2e6c7215650ce4571a73
This commit is contained in:
parent
5e3916050c
commit
9b13201356
|
@ -244,7 +244,7 @@ public class FlexBuffers {
|
||||||
public boolean isNull() {
|
public boolean isNull() {
|
||||||
return type == FBT_NULL;
|
return type == FBT_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the element is boolean type
|
* Checks whether the element is boolean type
|
||||||
* @return true if boolean type
|
* @return true if boolean type
|
||||||
|
@ -393,7 +393,7 @@ public class FlexBuffers {
|
||||||
case FBT_NULL: return 0;
|
case FBT_NULL: return 0;
|
||||||
case FBT_STRING: return Long.parseLong(asString());
|
case FBT_STRING: return Long.parseLong(asString());
|
||||||
case FBT_VECTOR: return asVector().size();
|
case FBT_VECTOR: return asVector().size();
|
||||||
case FBT_BOOL: readInt(bb, end, parentWidth);
|
case FBT_BOOL: return readInt(bb, end, parentWidth);
|
||||||
default:
|
default:
|
||||||
// Convert other things to uint.
|
// Convert other things to uint.
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -792,6 +792,10 @@ public class FlexBuffers {
|
||||||
|
|
||||||
return ((Key) obj).end == end && ((Key) obj).byteWidth == byteWidth;
|
return ((Key) obj).end == end && ((Key) obj).byteWidth == byteWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int hashCode() {
|
||||||
|
return end ^ byteWidth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue