Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 236157 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java (-2 / +7 lines)
Lines 156-171 Link Here
156
			return e.getStatus();
156
			return e.getStatus();
157
		}
157
		}
158
158
159
		IStatus status = null;
159
		// Do the actual transfer
160
		// Do the actual transfer
160
		try {
161
		try {
161
			return getSourceRepository().getArtifact(sourceDescriptor, destination, monitor);
162
			status = getSourceRepository().getArtifact(sourceDescriptor, destination, monitor);
162
		} finally {
163
		} finally {
163
			try {
164
			try {
164
				destination.close();
165
				destination.close();
165
			} catch (IOException e) {
166
			} catch (IOException e) {
166
				return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_closing_stream, getArtifactKey(), target.getLocation()), e);
167
				if (status != null && status.getSeverity() == IStatus.ERROR && status.getCode() == IArtifactRepository.CODE_RETRY)
168
					status = new MultiStatus(Activator.ID, status.getCode(), new IStatus[] {status}, NLS.bind(Messages.error_closing_stream, getArtifactKey(), target.getLocation()), e);
169
				else
170
					status = new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_closing_stream, getArtifactKey(), target.getLocation()), e);
167
			}
171
			}
168
		}
172
		}
173
		return status;
169
	}
174
	}
170
175
171
	public String toString() {
176
	public String toString() {

Return to bug 236157