Skip to content

Commit

Permalink
WT-2347 Added java fix for unsized 's' schema formats.
Browse files Browse the repository at this point in the history
This corresponds to Python fixes in WT-1517.
  • Loading branch information
ddanderson committed Jan 24, 2016
1 parent 0f71042 commit 3a25031
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lang/java/src/com/wiredtiger/db/PackOutputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,11 @@ public void addString(String value)
} 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) {
Expand Down

0 comments on commit 3a25031

Please sign in to comment.