diff options
author | Jon Bratseth <jonbratseth@yahoo.com> | 2016-12-20 09:22:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-20 09:22:00 +0100 |
commit | 5f32c0369cf796e46b70576d2f4eb8e470edb0e6 (patch) | |
tree | f15261cc22786afe1bdbab63e9075970501e542b /vespajlib/src/main/java/com/yahoo/tensor/serialization | |
parent | 3cd484f5a35af1b2fda324e3787c741be02179fa (diff) |
Revert "Revert "Bratseth/tensor subiterators""
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/serialization')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/serialization/SparseBinaryFormat.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/serialization/SparseBinaryFormat.java b/vespajlib/src/main/java/com/yahoo/tensor/serialization/SparseBinaryFormat.java index cb9a93fd233..8e15a994ed9 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/serialization/SparseBinaryFormat.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/serialization/SparseBinaryFormat.java @@ -48,9 +48,8 @@ class SparseBinaryFormat implements BinaryFormat { } private static void encodeAddress(GrowableByteBuffer buffer, TensorAddress address) { - for (String label : address.labels()) { - encodeString(buffer, label); - } + for (int i = 0; i < address.size(); i++) + encodeString(buffer, address.label(i)); } private static void encodeString(GrowableByteBuffer buffer, String value) { |