Fixed usages of Bytes.write(Bytes) to conform old semantics

This commit is contained in:
leventov
2015-02-01 19:49:58 +07:00
parent e38f6df14c
commit 938b9dca7b
9 changed files with 7 additions and 14 deletions
@@ -65,6 +65,6 @@ public abstract class BasicCopyingMetaBytesInterop<E, W> implements MetaBytesInt
@Override
public void write(W writer, Bytes bytes, E e) {
bytes.write(buffer.buffer);
bytes.write(buffer.buffer, buffer.buffer.position(), buffer.buffer.remaining());
}
}
@@ -44,6 +44,6 @@ public enum BytesBytesInterop implements BytesInterop<Bytes> {
@Override
public void write(Bytes bytes, Bytes e) {
bytes.write(e);
bytes.write(e, e.position(), e.remaining());
}
}
@@ -504,7 +504,7 @@ final class ChannelProvider implements Closeable {
@Override
public void writeExternalEntry(@NotNull Bytes entry, @NotNull Bytes destination,
int na) {
destination.write(entry);
destination.write(entry, entry.position(), entry.remaining());
}
@Override
@@ -755,7 +755,7 @@ class DiscoveryNodeBytesMarshallable implements BytesMarshallable {
return false;
BOOTSTRAP_BYTES.clear();
out.write(BOOTSTRAP_BYTES);
out.write(BOOTSTRAP_BYTES, BOOTSTRAP_BYTES.position(), BOOTSTRAP_BYTES.remaining());
ourProposedIdentifier.writeMarshallable(out);
return true;
@@ -514,7 +514,7 @@ final class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? supe
// write the key
entry.position(keyPosition);
entry.limit(keyLimit);
destination.write(entry);
destination.write(entry, entry.position(), entry.remaining());
boolean debugEnabled = LOG.isDebugEnabled();
String message = null;
@@ -539,7 +539,7 @@ final class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? supe
// writes the value
entry.limit(entry.position() + valueSize);
destination.write(entry);
destination.write(entry, entry.position(), entry.remaining());
if (debugEnabled) {
LOG.debug(message + "value=" + entry.toString().trim() + ")");
@@ -973,7 +973,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
@Override
public void write(Void writer, Bytes bytes, Bytes value) {
bytes.write(value);
bytes.write(value, value.position(), value.remaining());
}
}
@@ -480,7 +480,6 @@ public class CHMUseCasesTest {
}
}
@Ignore
@Test
public void testStringStringMap() throws ExecutionException, InterruptedException,
IOException {
@@ -516,7 +515,6 @@ public class CHMUseCasesTest {
}
@Ignore
@Test
public void testStringStringMapMutableValue() throws ExecutionException, InterruptedException, IOException {
@@ -2510,7 +2508,6 @@ public class CHMUseCasesTest {
}
}
@Ignore
@Test
public void testMapStringIntegerValueWithoutListMarshallers() throws IOException {
ChronicleMapBuilder<String, Map<String, Integer>> builder = ChronicleMapBuilder
@@ -53,7 +53,6 @@ public class DemoChronicleMapTest {
}
}
@Ignore
@Test
public void testMapLocked() throws Exception {
File file = File.createTempFile("DummyOrders-"+System.currentTimeMillis(), ".test");
@@ -269,7 +269,6 @@ public class StatelessClientTest {
}
}
@Ignore
@Test(timeout = 10000)
public void testServerPutStringKeyMap() throws IOException, InterruptedException {
@@ -287,7 +286,6 @@ public class StatelessClientTest {
}
}
@Ignore
@Test(timeout = 10000)
public void testServerPutClientReplace() throws IOException, InterruptedException {
@@ -330,7 +328,6 @@ public class StatelessClientTest {
}
@Ignore
@Test(timeout = 10000)
public void testStringKeyMapPutIfAbsentIntoStatelessMap() throws IOException,
InterruptedException {