srdo 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_r339677388
##########
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:
Should we be closing these readers?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services