Skip to content

Commit

Permalink
[HOPS-890] handle "casting" of IntVariable to LongVariable
Browse files Browse the repository at this point in the history
  • Loading branch information
berthoug committed Dec 4, 2018
1 parent 06872de commit 7f348c8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public Long getValue() {
@Override
public void setValue(byte[] val) {
if (val.length != getLength()) {
//it sometime (updates) happen that we want to convert a int to a long
if(val.length == 4){
ByteBuffer buf = ByteBuffer.wrap(val);
value = new Long(buf.getInt());
}
return;
}
ByteBuffer buf = ByteBuffer.wrap(val);
Expand Down

0 comments on commit 7f348c8

Please sign in to comment.