[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-9524) PublishCopyUtil#copyFile should not catch Exception but IOException

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Thu Aug 11 07:08:36 EDT 2011


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
    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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list