summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Anderson <dda@ddanderson.com>2016-01-24 07:37:56 -0500
committerDon Anderson <dda@ddanderson.com>2016-01-24 07:37:56 -0500
commit3a25031eb741e7e25cd1fc4efa1b6c72988ad679 (patch)
tree65f82c5d61abfdc017b5747a2f94de74fc8505f4
parent0f710425ba5ad4a37cda70f19954f1113531f7c3 (diff)
downloadmongo-3a25031eb741e7e25cd1fc4efa1b6c72988ad679.tar.gz
WT-2347 Added java fix for unsized 's' schema formats.
This corresponds to Python fixes in WT-1517.
-rw-r--r--lang/java/src/com/wiredtiger/db/PackOutputStream.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/lang/java/src/com/wiredtiger/db/PackOutputStream.java b/lang/java/src/com/wiredtiger/db/PackOutputStream.java
index b7a79295d73..805e34f6ca8 100644
--- a/lang/java/src/com/wiredtiger/db/PackOutputStream.java
+++ b/lang/java/src/com/wiredtiger/db/PackOutputStream.java
@@ -206,14 +206,11 @@ public class PackOutputStream {
} else {
stringLen = value.length();
}
- if (havesize) {
+ if (havesize || fieldFormat == 's') {
size = format.getLengthFromFormat(true);
if (stringLen > size) {
stringLen = size;
}
- } else if (fieldFormat == 's') {
- havesize = true;
- size = 1;
}
if (fieldFormat == 'S' && !havesize) {