Explicitly specify charset

- Explicitly specify app name encoding, which will go over the wire.
- Commented out unused Map for now

Change-Id: I9a076a5ef452850706bf15b0730aa149b4532fbd
diff --git a/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java b/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
index 39fddd8..30a7c31 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
@@ -15,8 +15,10 @@
  */
 package org.onosproject.store.app;
 
+import com.google.common.base.Charsets;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.util.concurrent.ListenableFuture;
+
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
@@ -52,8 +54,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executors;
@@ -297,8 +297,8 @@
     private void fetchBits(Application app) {
         ControllerNode localNode = clusterService.getLocalNode();
         ClusterMessage message = new ClusterMessage(localNode.id(), APP_BITS_REQUEST,
-                                                    app.id().name().getBytes());
-        Map<ControllerNode, ListenableFuture<byte[]>> futures = new HashMap<>();
+                                                    app.id().name().getBytes(Charsets.UTF_8));
+        //Map<ControllerNode, ListenableFuture<byte[]>> futures = new HashMap<>();
         CountDownLatch latch = new CountDownLatch(1);
 
         // FIXME: send message with name & version to make sure we don't get served old bits
@@ -329,7 +329,7 @@
     private class InternalBitServer implements ClusterMessageHandler {
         @Override
         public void handle(ClusterMessage message) {
-            String name = new String(message.payload());
+            String name = new String(message.payload(), Charsets.UTF_8);
             try {
                 message.respond(toByteArray(getApplicationInputStream(name)));
             } catch (Exception e) {