From dev-return-61008-archive-asf-public=cust-asf.ponee.io@storm.apache.org Sat Nov 2 02:45:52 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2CE8F180626 for ; Sat, 2 Nov 2019 03:45:52 +0100 (CET) Received: (qmail 49911 invoked by uid 500); 2 Nov 2019 02:45:50 -0000 Mailing-List: contact dev-help@storm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@storm.apache.org Delivered-To: mailing list dev@storm.apache.org Received: (qmail 49899 invoked by uid 99); 2 Nov 2019 02:45:49 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Nov 2019 02:45:49 +0000 From: GitBox To: dev@storm.apache.org Subject: [GitHub] [storm] efgpinto commented on a change in pull request #3155: STORM-3066: Implement support for using list elements in properties in FluxParser Message-ID: <157266274989.6339.4985077211079133337.gitbox@gitbox.apache.org> Date: Sat, 02 Nov 2019 02:45:49 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit efgpinto commented on a change in pull request #3155: STORM-3066: Implement support for using list elements in properties in FluxParser URL: https://github.com/apache/storm/pull/3155#discussion_r341796345 ########## File path: flux/flux-core/src/main/java/org/apache/storm/flux/parser/FluxParser.java ########## @@ -139,37 +149,49 @@ public static Properties parseProperties(String propertiesFile, boolean resource return properties; } - private static TopologyDef loadYaml(Yaml yaml, InputStream in, Properties properties, boolean envSubstitution) throws IOException { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); + private static TopologyDef loadYaml(Yaml yaml, InputStream in, Properties properties, boolean envSubstitution) { LOG.info("loading YAML from input stream..."); - int b = -1; - while ((b = in.read()) != -1) { - bos.write(b); - } + StringBuilder bos = new StringBuilder(); + BufferedReader reader = new BufferedReader(new InputStreamReader(in)); Review comment: Thanks, updated using try-with-resources ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services