From 73bc6960f69256a1901e8a85c474be928c8e0c1a Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Wed, 1 Oct 2014 18:01:25 +0100 Subject: [PATCH] HCOLL-134 ( release draft cut of the code so that I can test it across my network ) and commented out java 8 code in test so we can use java 7 --- pom.xml | 4 ++-- .../net/openhft/chronicle/map/NodeDiscoveryBroadcaster.java | 5 +++-- .../openhft/chronicle/map/NodeDiscoveryBroadcasterTest.java | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 29f224587..ec76020dc 100755 --- a/pom.xml +++ b/pom.xml @@ -133,8 +133,8 @@ -Xlint:deprecation 1.6 1.6 - 1.8 - 1.8 + 1.6 + 1.6 UTF-8 diff --git a/src/main/java/net/openhft/chronicle/map/NodeDiscoveryBroadcaster.java b/src/main/java/net/openhft/chronicle/map/NodeDiscoveryBroadcaster.java index 44b75a892..39aca9c75 100644 --- a/src/main/java/net/openhft/chronicle/map/NodeDiscoveryBroadcaster.java +++ b/src/main/java/net/openhft/chronicle/map/NodeDiscoveryBroadcaster.java @@ -412,7 +412,8 @@ class BytesExternalizableImpl implements BytesExternalizable { Bytes bytes = allNodes.activeIdentifierBytes(); //bytes.position(0); - toString(allNodes.activeIdentifierBitSet(), "writing"); + if (LOG.isDebugEnabled()) + toString(allNodes.activeIdentifierBitSet(), "writing"); // we will store the size of the bitset destination.writeUnsignedShort((int) bytes.remaining()); @@ -647,7 +648,7 @@ class BytesExternalizableImpl implements BytesExternalizable { long size = BOOTSTRAP_BYTES.limit(); - if (size < source.remaining()) + if (size > source.remaining()) return null; for (int i = 0; i < size; i++) { diff --git a/src/test/java/net/openhft/chronicle/map/NodeDiscoveryBroadcasterTest.java b/src/test/java/net/openhft/chronicle/map/NodeDiscoveryBroadcasterTest.java index bd382ddac..59a2ac237 100644 --- a/src/test/java/net/openhft/chronicle/map/NodeDiscoveryBroadcasterTest.java +++ b/src/test/java/net/openhft/chronicle/map/NodeDiscoveryBroadcasterTest.java @@ -27,7 +27,7 @@ public class NodeDiscoveryBroadcasterTest extends TestCase { DiscoveryCluster discoveryCluster = new DiscoveryCluster(); - ChronicleMap map = discoveryCluster.discoverMap(1025, 8086); + ChronicleMap map = discoveryCluster.discoverMap(1025, 8087); Thread.sleep(10000); }