Remove use Files.toByteArray() 63/84163/5
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Sep 2019 08:20:08 +0000 (10:20 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Sep 2019 18:17:58 +0000 (20:17 +0200)
We have Files.readAllBytes() as a replacement, use that.

Change-Id: Ie55e6ac3bc9be08713abcf985416a4682dbe9d6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/netconf-netty-util/src/test/java/org/opendaylight/netconf/nettyutil/handler/NetconfMessageFactoryTest.java

index 856a9d53855e3dd26c1e2c37b4139e059ce4b6b2..eae85439bff24c1239b0d55ea0a895031d553f49 100644 (file)
@@ -9,9 +9,9 @@ package org.opendaylight.netconf.nettyutil.handler;
 
 import static org.junit.Assert.assertEquals;
 
-import com.google.common.io.Files;
 import io.netty.buffer.Unpooled;
 import java.io.File;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.List;
 import org.junit.Test;
@@ -23,7 +23,7 @@ public class NetconfMessageFactoryTest {
         File authHelloFile = new File(getClass().getResource("/netconfMessages/client_hello_with_auth.xml").getFile());
 
         final List<Object> out = new ArrayList<>();
-        parser.decode(null, Unpooled.wrappedBuffer(Files.toByteArray(authHelloFile)), out);
+        parser.decode(null, Unpooled.wrappedBuffer(Files.readAllBytes(authHelloFile.toPath())), out);
         assertEquals(1, out.size());
     }
 }