[ https://issues.apache.org/jira/browse/SDAP-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487511#comment-16487511 ]
ASF GitHub Bot commented on SDAP-75: ------------------------------------ lewismc commented on a change in pull request #22: SDAP-75 URL: https://github.com/apache/incubator-sdap-mudrod/pull/22#discussion_r190301762 ########## File path: core/src/main/java/org/apache/sdap/mudrod/ontology/pre/AggregateTriples.java ########## @@ -62,30 +62,28 @@ public Object execute() { e2.printStackTrace(); } - FileWriter fw; - try { - fw = new FileWriter(file.getAbsoluteFile()); + try(FileWriter fw = new FileWriter(file.getAbsoluteFile())){ bw = new BufferedWriter(fw); - } catch (IOException e) { - e.printStackTrace(); - } - - File[] files = new File(this.props.getProperty(MudrodConstants.ONTOLOGY_INPUT_PATH)).listFiles(); - for (File file_in : files) { - String ext = FilenameUtils.getExtension(file_in.getAbsolutePath()); - if ("owl".equals(ext)) { - try { - loadxml(file_in.getAbsolutePath()); - getAllClass(); - } catch (JDOMException e1) { - e1.printStackTrace(); - } catch (IOException e1) { - e1.printStackTrace(); + File[] files = new File(this.props.getProperty(MudrodConstants.ONTOLOGY_INPUT_PATH)).listFiles(); + for (File file_in : files) { + String ext = FilenameUtils.getExtension(file_in.getAbsolutePath()); + if ("owl".equals(ext)) { + try { + loadxml(file_in.getAbsolutePath()); + getAllClass(); + } catch (JDOMException e1) { + e1.printStackTrace(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } - } + } catch (IOException e) { + // TODO Auto-generated catch block Review comment: Never leave comment stubs present in production level code. Either LOG or rethrow this exception. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Fix bugs in AggregateTriples.java > --------------------------------- > > Key: SDAP-75 > URL: https://issues.apache.org/jira/browse/SDAP-75 > Project: Apache Science Data Analytics Platform > Issue Type: Bug > Components: mudrod > Reporter: Yun Li > Priority: Major > Fix For: 0.1 > > > Fix bugs found in AggregateTriple by sonar coverage @[~lewismc] -- This message was sent by Atlassian JIRA (v7.6.3#76005)