aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2024-05-01 16:21:32 +0000
committerGerrit Code Review <support@gerrithub.io>2024-05-01 16:21:32 +0000
commitca0261ab184593016ffc7f2e9ea9a19cf2b1861a (patch)
treeb4019d2c504393e2bd243acba35552cc789c30e2 /org.eclipse.jgit
parente6a4a2a1fb11d7870bf3cccde3dbf88071b5a5cf (diff)
parent1ed38b81be368465f86c0f02113a5ec06d3cac96 (diff)
downloadjgit-ca0261ab184593016ffc7f2e9ea9a19cf2b1861a.tar.gz
jgit-ca0261ab184593016ffc7f2e9ea9a19cf2b1861a.zip
Merge "PackIndex: Make #getOffset protected to allow out-of-package subclasses"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java
index c42d1c8866..c2c3775d67 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java
@@ -228,7 +228,7 @@ public abstract class PackIndex
* etc. Positions past 2**31-1 are negative, but still valid.
* @return the offset in a pack for the corresponding entry.
*/
- abstract long getOffset(long nthPosition);
+ protected abstract long getOffset(long nthPosition);
/**
* Locate the file offset position for the requested object.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java
index 4563c9039c..5180df46bf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java
@@ -118,7 +118,7 @@ class PackIndexV1 extends PackIndex {
}
@Override
- long getOffset(long nthPosition) {
+ protected long getOffset(long nthPosition) {
final int levelOne = findLevelOne(nthPosition);
final int levelTwo = getLevelTwo(nthPosition, levelOne);
final int p = (4 + Constants.OBJECT_ID_LENGTH) * levelTwo;