Przeglądaj źródła

Merge "InternalPushConnection: don't swallow RuntimeException"

tags/v5.2.0.201811281532-m3
Dave Borowitz 5 lat temu
rodzic
commit
0e5cc09afe

+ 8
- 4
org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java Wyświetl plik

@@ -46,6 +46,7 @@ package org.eclipse.jgit.transport;
import java.io.IOException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.UncheckedIOException;

import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.JGitText;
@@ -103,10 +104,13 @@ class InternalPushConnection<C> extends BasePackPushConnection {
// Ignored. Client cannot use this repository.
} catch (ServiceNotAuthorizedException e) {
// Ignored. Client cannot use this repository.
} catch (IOException err) {
// Client side of the pipes should report the problem.
} catch (RuntimeException err) {
// Clients side will notice we went away, and report.
} catch (IOException e) {
// Since the InternalPushConnection
// is used in tests, we want to avoid hiding exceptions
// because they can point to programming errors on the server
// side. By rethrowing, the default handler will dump it
// to stderr.
throw new UncheckedIOException(e);
} finally {
try {
out_r.close();

Ładowanie…
Anuluj
Zapisz