summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2021-11-07 00:56:06 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2021-11-23 23:37:19 +0100
commit1e37438cb7b2b16b2733693292904d03f1ecd906 (patch)
tree87f0faef8390a40b99ad678b5cf964e3ef8a48fc /org.eclipse.jgit
parent912a34fb7b87294e179c4df018017f151f116e1a (diff)
downloadjgit-1e37438cb7b2b16b2733693292904d03f1ecd906.tar.gz
jgit-1e37438cb7b2b16b2733693292904d03f1ecd906.zip
[6.0 API cleanup] StoredObjectRepresentationNotAvailableException
Remove the unused parameter, which had a non-API type anyway. Bug: 576340 Change-Id: Id71c01a643e1f31a8ff61ff69f7915c373db3263 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java7
3 files changed, 13 insertions, 22 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
index 0708123e91..de210b01c4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, Google Inc. and others
+ * Copyright (C) 2010, 2021 Google Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -7,29 +7,23 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-
package org.eclipse.jgit.errors;
-import org.eclipse.jgit.internal.storage.pack.ObjectToPack;
-
/**
* A previously selected representation is no longer available.
*/
-public class StoredObjectRepresentationNotAvailableException extends Exception { //TODO remove unused ObjectToPack in 5.0
+public class StoredObjectRepresentationNotAvailableException extends Exception {
+
private static final long serialVersionUID = 1L;
/**
- * Construct an error for an object.
+ * Creates a new instance.
*
- * @param otp
- * the object whose current representation is no longer present.
* @param cause
- * cause
- * @since 4.10
+ * {@link Throwable} that caused this exception
+ * @since 6.0
*/
- public StoredObjectRepresentationNotAvailableException(ObjectToPack otp,
- Throwable cause) {
+ public StoredObjectRepresentationNotAvailableException(Throwable cause) {
super(cause);
- // Do nothing.
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
index b5bf03fcbb..bb76df1d5d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
@@ -415,8 +415,7 @@ public final class DfsPackFile extends BlockBasedFile {
try {
readFully(src.offset, buf, 0, 20, ctx);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
int c = buf[0] & 0xff;
final int typeCode = (c >> 4) & 7;
@@ -537,12 +536,11 @@ public final class DfsPackFile extends BlockBasedFile {
Long.valueOf(src.offset), getFileName()),
dataFormat);
- throw new StoredObjectRepresentationNotAvailableException(src,
+ throw new StoredObjectRepresentationNotAvailableException(
corruptObject);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
if (quickCopy != null) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
index 5efd4c5bfc..289c732f4e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
@@ -521,12 +521,11 @@ public class Pack implements Iterable<PackIndex.MutableEntry> {
Long.valueOf(src.offset), getPackFile()),
dataFormat);
- throw new StoredObjectRepresentationNotAvailableException(src,
+ throw new StoredObjectRepresentationNotAvailableException(
corruptObject);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
if (quickCopy != null) {
@@ -611,7 +610,7 @@ public class Pack implements Iterable<PackIndex.MutableEntry> {
try {
doOpen();
} catch (IOException thisPackNotValid) {
- throw new StoredObjectRepresentationNotAvailableException(otp,
+ throw new StoredObjectRepresentationNotAvailableException(
thisPackNotValid);
}
}