Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9524

PublishCopyUtil#copyFile should not catch Exception but IOException

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M3
    • 3.3.0.M3
    • server
    • None

      see https://source.jboss.org/cru/REV-JBIDE-4/#c80

      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
      		}
      	}
      }
      

            adietish@redhat.com André Dietisheim
            adietish@redhat.com André Dietisheim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: