]> source.dussan.org Git - jgit.git/commitdiff
DfsReader: Make PackLoadListener interface visible to subclasses 20/203720/2
authorIvan Frade <ifrade@google.com>
Fri, 18 Aug 2023 18:22:35 +0000 (11:22 -0700)
committerIvan Frade <ifrade@google.com>
Fri, 18 Aug 2023 18:43:10 +0000 (11:43 -0700)
A subclass cannot implement a listener with the default access.

Make the interface protected. Not public because so far only
subclasses are interested in this interface. We can widen the
visibility later if needed.

Change-Id: I54e5c0ef1312dfe2fa660bc8fb54e2be35c0f6df

org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java

index 16344068ee0d8c880bdbd3d1795f1fc37ef31eea..3f0adcba1a6ccf21a2f7577451aabd33384aef2c 100644 (file)
@@ -839,7 +839,7 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs {
        }
 
        /** Announces when data is loaded by reader */
-       interface PackLoadListener {
+       protected interface PackLoadListener {
                /**
                 * Immutable copy of a DFS block metadata
                 */
@@ -856,11 +856,11 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs {
                                this.size = src.size();
                        }
 
-                       int getIdentityHash() {
+                       public int getIdentityHash() {
                                return identityHash;
                        }
 
-                       int getSize() {
+                       public int getSize() {
                                return size;
                        }
                }
@@ -900,7 +900,7 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs {
                 * @param ext
                 *            Extension in the pack (e.g. PACK or REFTABLE)
                 * @param position
-                *            Block offset being loaded
+                *            Offset in the file requested by caller
                 * @param dfsBlockData
                 *            Metadata of the block
                 */