Github user ashokblend commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/284#discussion_r86708341
--- Diff:
core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java ---
@@ -117,18 +117,27 @@ public static void closeStreams(Closeable... streams)
{
// Added if to avoid NullPointerException in case one stream is being
passed as null
if (null != streams) {
for (Closeable stream : streams) {
- if (null != stream) {
- try {
- stream.close();
- } catch (IOException e) {
- LOGGER.error("Error while closing stream" + stream);
- }
+ try {
+ closeStream(stream);
+ } catch (IOException e) {
+ LOGGER.error("Error while closing stream:" + e);
--- End diff --
This is an optimizaion. This method calls another method which tthrows
IOException. During load we call the method which throws IO. Please check my
other changes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---