Skip to content

Commit

Permalink
Merge pull request #763 from alecgrieser/000761-getuserversion-order-…
Browse files Browse the repository at this point in the history
…of-operations

Fix issue with Versionstamp::getUserVersion on larger user versions
  • Loading branch information
etschannen authored Sep 11, 2018
2 parents 79f1b89 + 5128d97 commit 9e8c194
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public class Versionstamp implements Comparable<Versionstamp> {
* @return the unpacked user version included in the array
*/
public static int unpackUserVersion(byte[] bytes, int pos) {
return ((int)bytes[pos] & 0xff << 8) | ((int)bytes[pos + 1] & 0xff);
return (((int)bytes[pos] & 0xff) << 8) | ((int)bytes[pos + 1] & 0xff);
}

/**
Expand Down
1 change: 1 addition & 0 deletions documentation/sphinx/source/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Bindings
* Several cases where functions in go might previously cause a panic now return a non-``nil`` error. `(PR #532) <https://github.com/apple/foundationdb/pull/532>`_
* C API calls made on the network thread could be reordered with calls made from other threads. [6.0.2] `(Issue #518) <https://github.com/apple/foundationdb/issues/518>`_
* The TLS_PLUGIN option is now a no-op and has been deprecated. [6.0.10] `(PR #710) <https://github.com/apple/foundationdb/pull/710>`_
* Java: the `Versionstamp::getUserVersion() </javadoc/com/apple/foundationdb/tuple/Versionstamp.html#getUserVersion-->`_ method did not handle user versions greater than ``0x00FF`` due to operator precedence errors. [6.0.11] `(Issue #761) <https://github.com/apple/foundationdb/issues/761>`_

Other Changes
-------------
Expand Down

0 comments on commit 9e8c194

Please sign in to comment.