commit | ca0261ab184593016ffc7f2e9ea9a19cf2b1861a | [log] [tgz] |
---|---|---|
author | Ivan Frade <ifrade@google.com> | Wed May 01 16:21:32 2024 +0000 |
committer | Gerrit Code Review <support@gerrithub.io> | Wed May 01 16:21:32 2024 +0000 |
tree | b4019d2c504393e2bd243acba35552cc789c30e2 | |
parent | e6a4a2a1fb11d7870bf3cccde3dbf88071b5a5cf [diff] | |
parent | 1ed38b81be368465f86c0f02113a5ec06d3cac96 [diff] |
Merge "PackIndex: Make #getOffset protected to allow out-of-package subclasses"
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 c42d1c8..c2c3775 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 @@ * 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 4563c90..5180df4 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 @@ } @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;