[jbosstools-issues] [JBoss JIRA] (JBIDE-9524) PublishCopyUtil#copyFile should not catch Exception but IOException
Martin Malina (JIRA)
jira-events at lists.jboss.org
Thu Apr 5 06:21:47 EDT 2012
[ https://issues.jboss.org/browse/JBIDE-9524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Malina closed JBIDE-9524.
--------------------------------
> PublishCopyUtil#copyFile should not catch Exception but IOException
> -------------------------------------------------------------------
>
> Key: JBIDE-9524
> URL: https://issues.jboss.org/browse/JBIDE-9524
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: JBossAS/Servers
> Affects Versions: 3.3.0.M3
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Fix For: 3.3.0.M3
>
>
> see https://source.jboss.org/cru/REV-JBIDE-4/#c80
> {code}
> private IStatus copyFile(InputStream in, String to) {
> try {
> FileUtils.writeTo(in, to);
> return Status.OK_STATUS;
> } catch (Exception e) {
> //Trace.trace(Trace.SEVERE, "Error copying file", e);
> return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);
> } finally {
> try {
> if (in != null)
> in.close();
> } catch (Exception ex) {
> // ignore
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list