Fix findbugs violations in netconf
[netconf.git] / netconf / yanglib / src / main / java / org / opendaylight / yanglib / impl / YangLibServiceImpl.java
index e75776f84b533c6f7baefa94ab5d0b198ffce754..7b942dd0072f38b146772299b20485354584075b 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.base.Preconditions;
 import com.google.common.io.ByteStreams;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.io.IOException;
+import java.nio.charset.Charset;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.yanglib.api.YangLibService;
 import org.opendaylight.yangtools.yang.common.Revision;
@@ -51,7 +52,7 @@ public class YangLibServiceImpl implements YangLibService {
 
         try {
             final YangTextSchemaSource source = sourceFuture.get();
-            return new String(ByteStreams.toByteArray(source.openStream()));
+            return new String(ByteStreams.toByteArray(source.openStream()), Charset.defaultCharset());
         } catch (InterruptedException | ExecutionException | IOException e) {
             throw new IllegalStateException("Unable to get schema " + sourceId, e);
         }