From 0be514026c33ef058fb6778ac5be239dc2ee5fc8 Mon Sep 17 00:00:00 2001 From: Li Jiale Date: Wed, 24 Apr 2019 18:05:31 +0800 Subject: fixed read configuration file error Change-Id: I07fa8c614c5bc392a6e46d4cdb0fb30e8dcb2308 Issue-ID: VFC-1366 Signed-off-by: li jiale --- .../nfvo/multivimproxy/common/util/restclient/RestfulConfigure.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/RestfulConfigure.java b/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/RestfulConfigure.java index ad186c9..7d0c1eb 100644 --- a/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/RestfulConfigure.java +++ b/service/src/main/java/org/onap/vfc/nfvo/multivimproxy/common/util/restclient/RestfulConfigure.java @@ -137,8 +137,9 @@ public class RestfulConfigure { final StringBuilder jsonstr = new StringBuilder(); try (BufferedReader reader = new BufferedReader(new FileReader(file))){ final ReaderHelper rHelpper = new ReaderHelper(reader); - while(null != rHelpper.getLine()) { - jsonstr.append(rHelpper.getLine()); + String readLine = null; + while(null != (readLine = rHelpper.getLine())) { + jsonstr.append(readLine); } } catch(final IOException e) { LOG.error("load file exception:" + e); -- cgit 1.2.3-korg