Pārlūkot izejas kodu

Join catch sections using multicatch

Change-Id: I1a9112e6a4f938638c599b489cb0858eca27ab91
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
tags/v5.4.0.201905081430-m2
Carsten Hammer pirms 5 gadiem
vecāks
revīzija
c0268f899e
36 mainītis faili ar 69 papildinājumiem un 223 dzēšanām
  1. 1
    7
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
  2. 1
    3
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
  3. 1
    5
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
  4. 7
    12
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
  5. 5
    15
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
  6. 1
    4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
  7. 1
    3
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
  8. 1
    4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
  9. 1
    4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
  10. 1
    4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
  11. 1
    4
      org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java
  12. 1
    3
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java
  13. 6
    10
      org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
  14. 2
    7
      org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
  15. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
  16. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java
  17. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
  18. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java
  19. 2
    14
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
  20. 3
    21
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
  21. 1
    7
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
  22. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindow.java
  23. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java
  24. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/nls/TranslationBundle.java
  25. 1
    4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
  26. 1
    4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
  27. 2
    8
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
  28. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java
  29. 3
    7
      org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java
  30. 6
    8
      org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java
  31. 1
    4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
  32. 3
    9
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
  33. 4
    13
      org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
  34. 1
    5
      org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java
  35. 2
    7
      org.eclipse.jgit/src/org/eclipse/jgit/util/GSSManagerFactory.java
  36. 1
    3
      org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java

+ 1
- 7
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java Parādīt failu

try { try {
write(f, body); write(f, body);
return f; return f;
} catch (Error e) {
f.delete();
throw e;
} catch (RuntimeException e) {
f.delete();
throw e;
} catch (IOException e) {
} catch (Error | RuntimeException | IOException e) {
f.delete(); f.delete();
throw e; throw e;
} }

+ 1
- 3
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java Parādīt failu

git.branchCreate().setName(branch).setStartPoint(commit).call(); git.branchCreate().setName(branch).setStartPoint(commit).call();


return commit; return commit;
} catch (IOException e) {
throw new RuntimeException(e);
} catch (GitAPIException e) {
} catch (IOException | GitAPIException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }

+ 1
- 5
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java Parādīt failu

final Class<? extends TextBuiltin> clazz; final Class<? extends TextBuiltin> clazz;
try { try {
clazz = Class.forName(cn, false, ldr).asSubclass(TextBuiltin.class); clazz = Class.forName(cn, false, ldr).asSubclass(TextBuiltin.class);
} catch (ClassNotFoundException notBuiltin) {
} catch (ClassNotFoundException | ClassCastException notBuiltin) {
// Doesn't exist, even though the service entry is present. // Doesn't exist, even though the service entry is present.
//
return;
} catch (ClassCastException notBuiltin) {
// Isn't really a builtin, even though its listed as such. // Isn't really a builtin, even though its listed as such.
//
return; return;
} }



+ 7
- 12
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java Parādīt failu

final Constructor<? extends TextBuiltin> c; final Constructor<? extends TextBuiltin> c;
try { try {
c = impl.getDeclaredConstructor(); c = impl.getDeclaredConstructor();
} catch (SecurityException e) {
throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
} catch (NoSuchMethodException e) {
throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
} catch (SecurityException | NoSuchMethodException e) {
throw new RuntimeException(MessageFormat
.format(CLIText.get().cannotCreateCommand, getName(), e));
} }
c.setAccessible(true); c.setAccessible(true);


final TextBuiltin r; final TextBuiltin r;
try { try {
r = c.newInstance(); r = c.newInstance();
} catch (InstantiationException e) {
throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
} catch (IllegalAccessException e) {
throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
} catch (IllegalArgumentException e) {
throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
} catch (InvocationTargetException e) {
throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
} catch (InstantiationException | IllegalAccessException
| IllegalArgumentException | InvocationTargetException e) {
throw new RuntimeException(MessageFormat
.format(CLIText.get().cannotCreateCommand, getName(), e));
} }
r.setCommandName(getName()); r.setCommandName(getName());
return r; return r;

+ 5
- 15
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java Parādīt failu

install("org.eclipse.jgit.console.ConsoleAuthenticator"); //$NON-NLS-1$ install("org.eclipse.jgit.console.ConsoleAuthenticator"); //$NON-NLS-1$
install("org.eclipse.jgit.console.ConsoleCredentialsProvider"); //$NON-NLS-1$ install("org.eclipse.jgit.console.ConsoleCredentialsProvider"); //$NON-NLS-1$
return true; return true;
} catch (ClassNotFoundException e) {
} catch (ClassNotFoundException | NoClassDefFoundError
| UnsupportedClassVersionError e) {
return false; return false;
} catch (NoClassDefFoundError e) {
return false;
} catch (UnsupportedClassVersionError e) {
return false;

} catch (IllegalArgumentException e) {
throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
} catch (SecurityException e) {
throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
} catch (IllegalAccessException e) {
throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
} catch (InvocationTargetException e) {
throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
} catch (NoSuchMethodException e) {
} catch (IllegalArgumentException | SecurityException
| IllegalAccessException | InvocationTargetException
| NoSuchMethodException e) {
throw new RuntimeException(CLIText.get().cannotSetupConsole, e); throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
} }
} }

+ 1
- 4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java Parādīt failu

} }
} }
} }
} catch (IllegalArgumentException e) {
throw die("Cannot determine names", e); //$NON-NLS-1$
} catch (IllegalAccessException e) {
} catch (IllegalArgumentException | IllegalAccessException e) {
throw die("Cannot determine names", e); //$NON-NLS-1$ throw die("Cannot determine names", e); //$NON-NLS-1$
} }

return all; return all;
} }



+ 1
- 3
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java Parādīt failu

folds.add(fold); folds.add(fold);
} }
} }
} catch (IllegalArgumentException e) {
throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$
} catch (IllegalAccessException e) {
} catch (IllegalArgumentException | IllegalAccessException e) {
throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$ throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$
} }



+ 1
- 4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java Parādīt failu

final CanonicalTreeParser p = new CanonicalTreeParser(); final CanonicalTreeParser p = new CanonicalTreeParser();
try (ObjectReader curs = clp.getRepository().newObjectReader()) { try (ObjectReader curs = clp.getRepository().newObjectReader()) {
p.reset(curs, clp.getRevWalk().parseTree(id)); p.reset(curs, clp.getRevWalk().parseTree(id));
} catch (MissingObjectException e) {
throw new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name);
} catch (IncorrectObjectTypeException e) {
} catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp, throw new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name); CLIText.format(CLIText.get().notATree), name);
} catch (IOException e) { } catch (IOException e) {

+ 1
- 4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java Parādīt failu

final RevCommit c; final RevCommit c;
try { try {
c = clp.getRevWalk().parseCommit(id); c = clp.getRevWalk().parseCommit(id);
} catch (MissingObjectException e) {
throw new CmdLineException(clp,
CLIText.format(CLIText.get().notACommit), name);
} catch (IncorrectObjectTypeException e) {
} catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp, throw new CmdLineException(clp,
CLIText.format(CLIText.get().notACommit), name); CLIText.format(CLIText.get().notACommit), name);
} catch (IOException e) { } catch (IOException e) {

+ 1
- 4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java Parādīt failu

final RevTree c; final RevTree c;
try { try {
c = clp.getRevWalk().parseTree(id); c = clp.getRevWalk().parseTree(id);
} catch (MissingObjectException e) {
throw new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name);
} catch (IncorrectObjectTypeException e) {
} catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp, throw new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name); CLIText.format(CLIText.get().notATree), name);
} catch (IOException e) { } catch (IOException e) {

+ 1
- 4
org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java Parādīt failu

timeoutMillis -= TimeUnit.NANOSECONDS timeoutMillis -= TimeUnit.NANOSECONDS
.toMillis(System.nanoTime() - start); .toMillis(System.nanoTime() - start);
} }
} catch (IOException e) {
exec.close(true);
throw e;
} catch (RuntimeException e) {
} catch (IOException | RuntimeException e) {
exec.close(true); exec.close(true);
throw e; throw e;
} }

+ 1
- 3
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java Parādīt failu

try { try {
refUpdateLockedRef.await(); refUpdateLockedRef.await();
packRefsDone.await(); packRefsDone.await();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (BrokenBarrierException e) {
} catch (InterruptedException | BrokenBarrierException e) {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }
return super.isForceUpdate(); return super.isForceUpdate();

+ 6
- 10
org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java Parādīt failu

RevCommit commit = null; RevCommit commit = null;
try { try {
commit = walk.parseCommit(objectId); commit = walk.parseCommit(objectId);
} catch (MissingObjectException e) {
// ignore: the ref points to an object that does not exist;
// it should be ignored as traversal starting point.
} catch (IncorrectObjectTypeException e) {
// ignore: the ref points to an object that is not a commit
// (e.g. a tree or a blob);
// it should be ignored as traversal starting point.
} catch (MissingObjectException | IncorrectObjectTypeException e) {
// ignore as traversal starting point:
// - the ref points to an object that does not exist
// - the ref points to an object that is not a commit (e.g. a
// tree or a blob)
} }
if (commit != null) if (commit != null)
add(commit); add(commit);
} else } else
walk.markUninteresting(walk.lookupCommit(start)); walk.markUninteresting(walk.lookupCommit(start));
return this; return this;
} catch (MissingObjectException e) {
throw e;
} catch (IncorrectObjectTypeException e) {
} catch (MissingObjectException | IncorrectObjectTypeException e) {
throw e; throw e;
} catch (IOException e) { } catch (IOException e) {
throw new JGitInternalException(MessageFormat.format( throw new JGitInternalException(MessageFormat.format(

+ 2
- 7
org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java Parādīt failu

} }
} }
return newCommit; return newCommit;
} catch (RefAlreadyExistsException e) {
throw new JGitInternalException(e.getMessage(), e);
} catch (RefNotFoundException e) {
throw new JGitInternalException(e.getMessage(), e);
} catch (InvalidRefNameException e) {
throw new JGitInternalException(e.getMessage(), e);
} catch (CheckoutConflictException e) {
} catch (RefAlreadyExistsException | RefNotFoundException
| InvalidRefNameException | CheckoutConflictException e) {
throw new JGitInternalException(e.getMessage(), e); throw new JGitInternalException(e.getMessage(), e);
} }
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java Parādīt failu

modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION,
name, ConfigConstants.CONFIG_KEY_URL, uri); name, ConfigConstants.CONFIG_KEY_URL, uri);
modulesConfig.save(); modulesConfig.save();
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
} catch (ConfigInvalidException e) {
} catch (IOException | ConfigInvalidException e) {
throw new JGitInternalException(e.getMessage(), e); throw new JGitInternalException(e.getMessage(), e);
} }



+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java Parādīt failu

if (!initialized.isEmpty()) if (!initialized.isEmpty())
config.save(); config.save();
return initialized; return initialized;
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
} catch (ConfigInvalidException e) {
} catch (IOException | ConfigInvalidException e) {
throw new JGitInternalException(e.getMessage(), e); throw new JGitInternalException(e.getMessage(), e);
} }
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java Parādīt failu

statuses.put(status.getPath(), status); statuses.put(status.getPath(), status);
} }
return statuses; return statuses;
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
} catch (ConfigInvalidException e) {
} catch (IOException | ConfigInvalidException e) {
throw new JGitInternalException(e.getMessage(), e); throw new JGitInternalException(e.getMessage(), e);
} }
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java Parādīt failu

if (!synced.isEmpty()) if (!synced.isEmpty())
config.save(); config.save();
return synced; return synced;
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
} catch (ConfigInvalidException e) {
} catch (IOException | ConfigInvalidException e) {
throw new JGitInternalException(e.getMessage(), e); throw new JGitInternalException(e.getMessage(), e);
} }
} }

+ 2
- 14
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java Parādīt failu



try { try {
c.read(); c.read();
} catch (IOException e) {
c.unlock();
throw e;
} catch (RuntimeException e) {
c.unlock();
throw e;
} catch (Error e) {
} catch (IOException | RuntimeException | Error e) {
c.unlock(); c.unlock();
throw e; throw e;
} }
try (OutputStream o = tmp.getOutputStream(); try (OutputStream o = tmp.getOutputStream();
OutputStream bo = new BufferedOutputStream(o)) { OutputStream bo = new BufferedOutputStream(o)) {
writeTo(liveFile.getParentFile(), bo); writeTo(liveFile.getParentFile(), bo);
} catch (IOException err) {
tmp.unlock();
throw err;
} catch (RuntimeException err) {
tmp.unlock();
throw err;
} catch (Error err) {
} catch (IOException | RuntimeException | Error err) {
tmp.unlock(); tmp.unlock();
throw err; throw err;
} }

+ 3
- 21
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java Parādīt failu

// Don't worry about a file that doesn't exist yet, it // Don't worry about a file that doesn't exist yet, it
// conceptually has no current content to copy. // conceptually has no current content to copy.
// //
} catch (IOException ioe) {
unlock();
throw ioe;
} catch (RuntimeException ioe) {
unlock();
throw ioe;
} catch (Error ioe) {
} catch (IOException | RuntimeException | Error ioe) {
unlock(); unlock();
throw ioe; throw ioe;
} }
} }
os.close(); os.close();
os = null; os = null;
} catch (IOException ioe) {
unlock();
throw ioe;
} catch (RuntimeException ioe) {
unlock();
throw ioe;
} catch (Error ioe) {
} catch (IOException | RuntimeException | Error ioe) {
unlock(); unlock();
throw ioe; throw ioe;
} }
os.getChannel().force(true); os.getChannel().force(true);
out.close(); out.close();
os = null; os = null;
} catch (IOException ioe) {
unlock();
throw ioe;
} catch (RuntimeException ioe) {
unlock();
throw ioe;
} catch (Error ioe) {
} catch (IOException | RuntimeException | Error ioe) {
unlock(); unlock();
throw ioe; throw ioe;
} }

+ 1
- 7
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java Parādīt failu

if (mmap) if (mmap)
return pack.mmap(offset, windowSize); return pack.mmap(offset, windowSize);
return pack.read(offset, windowSize); return pack.read(offset, windowSize);
} catch (IOException e) {
close(pack);
throw e;
} catch (RuntimeException e) {
close(pack);
throw e;
} catch (Error e) {
} catch (IOException | RuntimeException | Error e) {
close(pack); close(pack);
throw e; throw e;
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindow.java Parādīt failu



resObj.setCachedDelta(deltaCache.cache(zbuf, len, deltaLen)); resObj.setCachedDelta(deltaCache.cache(zbuf, len, deltaLen));
resObj.setCachedSize(deltaLen); resObj.setCachedSize(deltaLen);
} catch (IOException err) {
deltaCache.credit(deltaLen);
} catch (OutOfMemoryError err) {
} catch (IOException | OutOfMemoryError err) {
deltaCache.credit(deltaLen); deltaCache.credit(deltaLen);
} }
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java Parādīt failu

bundles.put(type, bundle); bundles.put(type, bundle);
} }
return (T) bundle; return (T) bundle;
} catch (InstantiationException e) {
throw new Error(e);
} catch (IllegalAccessException e) {
} catch (InstantiationException | IllegalAccessException e) {
throw new Error(e); throw new Error(e);
} }
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/nls/TranslationBundle.java Parādīt failu

field.set(this, translatedText); field.set(this, translatedText);
} catch (MissingResourceException e) { } catch (MissingResourceException e) {
throw new TranslationStringMissingException(bundleClass, locale, field.getName(), e); throw new TranslationStringMissingException(bundleClass, locale, field.getName(), e);
} catch (IllegalArgumentException e) {
throw new Error(e);
} catch (IllegalAccessException e) {
} catch (IllegalArgumentException | IllegalAccessException e) {
throw new Error(e); throw new Error(e);
} }
} }

+ 1
- 4
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java Parādīt failu

} catch (TransportException err) { } catch (TransportException err) {
close(); close();
throw err; throw err;
} catch (IOException err) {
close();
throw new TransportException(err.getMessage(), err);
} catch (RuntimeException err) {
} catch (IOException | RuntimeException err) {
close(); close();
throw new TransportException(err.getMessage(), err); throw new TransportException(err.getMessage(), err);
} }

+ 1
- 4
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java Parādīt failu

} catch (CancelledException ce) { } catch (CancelledException ce) {
close(); close();
return; // Caller should test (or just know) this themselves. return; // Caller should test (or just know) this themselves.
} catch (IOException err) {
close();
throw new TransportException(err.getMessage(), err);
} catch (RuntimeException err) {
} catch (IOException | RuntimeException err) {
close(); close();
throw new TransportException(err.getMessage(), err); throw new TransportException(err.getMessage(), err);
} }

+ 2
- 8
org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java Parādīt failu

} catch (TransportException err) { } catch (TransportException err) {
close(); close();
throw err; throw err;
} catch (IOException err) {
close();
throw new TransportException(transport.uri, err.getMessage(), err);
} catch (RuntimeException err) {
} catch (IOException | RuntimeException err) {
close(); close();
throw new TransportException(transport.uri, err.getMessage(), err); throw new TransportException(transport.uri, err.getMessage(), err);
} }
packLock = parser.parse(NullProgressMonitor.INSTANCE); packLock = parser.parse(NullProgressMonitor.INSTANCE);
ins.flush(); ins.flush();
} }
} catch (IOException err) {
close();
throw new TransportException(transport.uri, err.getMessage(), err);
} catch (RuntimeException err) {
} catch (IOException | RuntimeException err) {
close(); close();
throw new TransportException(transport.uri, err.getMessage(), err); throw new TransportException(transport.uri, err.getMessage(), err);
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java Parādīt failu

SecretKeySpec signingKey = new SecretKeySpec(keyBytes, "HmacSHA1"); //$NON-NLS-1$ SecretKeySpec signingKey = new SecretKeySpec(keyBytes, "HmacSHA1"); //$NON-NLS-1$
mac = Mac.getInstance("HmacSHA1"); //$NON-NLS-1$ mac = Mac.getInstance("HmacSHA1"); //$NON-NLS-1$
mac.init(signingKey); mac.init(signingKey);
} catch (InvalidKeyException e) {
throw new IllegalStateException(e);
} catch (NoSuchAlgorithmException e) {
} catch (InvalidKeyException | NoSuchAlgorithmException e) {
throw new IllegalStateException(e); throw new IllegalStateException(e);
} }
} }

+ 3
- 7
org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java Parādīt failu

try { try {
final UploadPack rp = uploadPackFactory.create(req, remote); final UploadPack rp = uploadPackFactory.create(req, remote);
rp.upload(out_r, in_w, null); rp.upload(out_r, in_w, null);
} catch (ServiceNotEnabledException e) {
} catch (ServiceNotEnabledException
| ServiceNotAuthorizedException e) {
// Ignored. Client cannot use this repository. // Ignored. Client cannot use this repository.
} catch (ServiceNotAuthorizedException e) {
// Ignored. Client cannot use this repository.
} catch (IOException err) {
} catch (IOException | RuntimeException err) {
// Client side of the pipes should report the problem. // Client side of the pipes should report the problem.
err.printStackTrace(); err.printStackTrace();
} catch (RuntimeException err) {
// Client side will notice we went away, and report.
err.printStackTrace();
} finally { } finally {
try { try {
out_r.close(); out_r.close();

+ 6
- 8
org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java Parādīt failu

try { try {
final ReceivePack rp = receivePackFactory.create(req, remote); final ReceivePack rp = receivePackFactory.create(req, remote);
rp.receive(out_r, in_w, System.err); rp.receive(out_r, in_w, System.err);
} catch (ServiceNotEnabledException e) {
// Ignored. Client cannot use this repository.
} catch (ServiceNotAuthorizedException e) {
} catch (ServiceNotEnabledException
| ServiceNotAuthorizedException e) {
// Ignored. Client cannot use this repository. // Ignored. Client cannot use this repository.
} catch (IOException e) { } 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.
// 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); throw new UncheckedIOException(e);
} finally { } finally {
try { try {

+ 1
- 4
org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java Parādīt failu

TransportProtocol proto; TransportProtocol proto;
try { try {
proto = (TransportProtocol) f.get(null); proto = (TransportProtocol) f.get(null);
} catch (IllegalArgumentException e) {
// If we cannot access the field, don't.
continue;
} catch (IllegalAccessException e) {
} catch (IllegalArgumentException | IllegalAccessException e) {
// If we cannot access the field, don't. // If we cannot access the field, don't.
continue; continue;
} }

+ 3
- 9
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java Parādīt failu

try (InputStream in = openInputStream(c)) { try (InputStream in = openInputStream(c)) {
return getConnection(c, in, service); return getConnection(c, in, service);
} }
} catch (NotSupportedException err) {
throw err;
} catch (TransportException err) {
} catch (NotSupportedException | TransportException err) {
throw err; throw err;
} catch (IOException err) { } catch (IOException err) {
throw new TransportException(uri, JGitText.get().errorReadingInfoRefs, err); throw new TransportException(uri, JGitText.get().errorReadingInfoRefs, err);
throw new NotSupportedException(msg); throw new NotSupportedException(msg);
} }
} }
} catch (NotSupportedException err) {
throw err;
} catch (TransportException err) {
} catch (NotSupportedException | TransportException err) {
throw err; throw err;
} catch (IOException err) { } catch (IOException err) {
throw new TransportException(uri, JGitText.get().errorReadingInfoRefs, err); throw new TransportException(uri, JGitText.get().errorReadingInfoRefs, err);
String err = status + " " + conn.getResponseMessage(); //$NON-NLS-1$ String err = status + " " + conn.getResponseMessage(); //$NON-NLS-1$
throw new TransportException(uri, err); throw new TransportException(uri, err);
} }
} catch (NotSupportedException e) {
throw e;
} catch (TransportException e) {
} catch (NotSupportedException | TransportException e) {
throw e; throw e;
} catch (SSLHandshakeException e) { } catch (SSLHandshakeException e) {
handleSslFailure(e); handleSslFailure(e);

+ 4
- 13
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java Parādīt failu

} catch (ServiceMayNotContinueException noPack) { } catch (ServiceMayNotContinueException noPack) {
// This was already reported on (below). // This was already reported on (below).
throw noPack; throw noPack;
} catch (IOException err) {
if (reportInternalServerErrorOverSideband())
} catch (IOException | RuntimeException | Error err) {
if (reportInternalServerErrorOverSideband()) {
throw new UploadPackInternalServerErrorException(err); throw new UploadPackInternalServerErrorException(err);
else
throw err;
} catch (RuntimeException err) {
if (reportInternalServerErrorOverSideband())
throw new UploadPackInternalServerErrorException(err);
else
throw err;
} catch (Error err) {
if (reportInternalServerErrorOverSideband())
throw new UploadPackInternalServerErrorException(err);
else
} else {
throw err; throw err;
}
} }
} else { } else {
sendPack(false, req, accumulator, allTags, unshallowCommits, deepenNots); sendPack(false, req, accumulator, allTags, unshallowCommits, deepenNots);

+ 1
- 5
org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java Parādīt failu

} else } else
throw new ServiceNotEnabledException(); throw new ServiceNotEnabledException();


} catch (RuntimeException e) {
db.close();
throw new RepositoryNotFoundException(name, e);

} catch (IOException e) {
} catch (RuntimeException | IOException e) {
db.close(); db.close();
throw new RepositoryNotFoundException(name, e); throw new RepositoryNotFoundException(name, e);



+ 2
- 7
org.eclipse.jgit/src/org/eclipse/jgit/util/GSSManagerFactory.java Parādīt failu



return (GSSManager) GSS_MANAGER_IMPL_CONSTRUCTOR return (GSSManager) GSS_MANAGER_IMPL_CONSTRUCTOR
.newInstance(httpCaller); .newInstance(httpCaller);
} catch (InstantiationException e) {
throw new Error(e);
} catch (IllegalAccessException e) {
throw new Error(e);
} catch (IllegalArgumentException e) {
throw new Error(e);
} catch (InvocationTargetException e) {
} catch (InstantiationException | IllegalAccessException
| IllegalArgumentException | InvocationTargetException e) {
throw new Error(e); throw new Error(e);
} }
} }

+ 1
- 3
org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java Parādīt failu

try { try {
conn.configure(null, trustAllCerts, null); conn.configure(null, trustAllCerts, null);
conn.setHostnameVerifier(new DummyHostnameVerifier()); conn.setHostnameVerifier(new DummyHostnameVerifier());
} catch (KeyManagementException e) {
throw new IOException(e.getMessage());
} catch (NoSuchAlgorithmException e) {
} catch (KeyManagementException | NoSuchAlgorithmException e) {
throw new IOException(e.getMessage()); throw new IOException(e.getMessage());
} }
} }

Notiek ielāde…
Atcelt
Saglabāt