[ https://issues.apache.org/jira/browse/GEODE-7864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17213320#comment-17213320 ]
ASF GitHub Bot commented on GEODE-7864: --------------------------------------- upthewaterspout commented on a change in pull request #5582: URL: https://github.com/apache/geode/pull/5582#discussion_r504198531 ########## File path: geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java ########## @@ -101,26 +101,36 @@ public ResultModel deploy( for (DistributedMember member : targetMembers) { List<RemoteInputStream> remoteStreams = new ArrayList<>(); List<String> jarNames = new ArrayList<>(); - for (String jarFullPath : jarFullPaths) { - remoteStreams - .add(exporter.export(new SimpleRemoteInputStream(new FileInputStream(jarFullPath)))); - jarNames.add(FilenameUtils.getName(jarFullPath)); - } - - // this deploys the jars to all the matching servers - ResultCollector<?, ?> resultCollector = - executeFunction(this.deployFunction, new Object[] {jarNames, remoteStreams}, member); - - @SuppressWarnings("unchecked") - final List<List<Object>> resultCollectorResult = - (List<List<Object>>) resultCollector.getResult(); - results.add(resultCollectorResult.get(0)); + try { + for (String jarFullPath : jarFullPaths) { + FileInputStream fileInputStream = null; + try { + fileInputStream = new FileInputStream(jarFullPath); + remoteStreams.add(exporter.export(new SimpleRemoteInputStream(fileInputStream))); + jarNames.add(FilenameUtils.getName(jarFullPath)); + } catch (Exception ex) { + if (fileInputStream != null) { + fileInputStream.close(); Review comment: Does this need to swallow IOExceptions? ---------------------------------------------------------------- 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: us...@infra.apache.org > Code improvement refactoring > ---------------------------- > > Key: GEODE-7864 > URL: https://issues.apache.org/jira/browse/GEODE-7864 > Project: Geode > Issue Type: Improvement > Reporter: Nabarun Nag > Priority: Major > Labels: pull-request-available > Time Spent: 13h 10m > Remaining Estimate: 0h > > This is a placeholder ticket. > * this is used to do refactoring. > * this ticket number is used to number the commit message. > * this ticket will never be closed. > * it will be used to mark improvements like correcting spelling mistakes, > efficient java code, etc. -- This message was sent by Atlassian Jira (v8.3.4#803005)