Skip to content

Commit 87c193f

Browse files
author
Vladimir Kotal
authored
make FNode members private (#2263)
1 parent 51149d0 commit 87c193f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/web/EftarFileReader.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ public class EftarFileReader {
5050

5151
public class FNode {
5252

53-
public long offset;
54-
public long hash;
55-
public int childOffset;
56-
public int numChildren;
57-
public int tagOffset;
53+
private long offset;
54+
private long hash;
55+
private int childOffset;
56+
private int numChildren;
57+
private int tagOffset;
5858

5959
public FNode() throws IOException {
6060
offset = f.getFilePointer();
61-
//System.err.println("offset " + offset);
61+
6262
try {
6363
hash = f.readLong();
6464
childOffset = f.readUnsignedShort();
@@ -68,7 +68,6 @@ public FNode() throws IOException {
6868
numChildren = 0;
6969
tagOffset = 0;
7070
}
71-
//System.err.println("offset " + offset + " num children " + numChildren + " tagOff " + tagOffset);
7271
}
7372

7473
public FNode(long hash, long offset, int childOffset, int num, int tagOffset) {
@@ -87,7 +86,6 @@ public FNode get(long hash) throws IOException {
8786
}
8887

8988
private FNode binarySearch(long start, int len, long hash) throws IOException {
90-
//System.err.printf(" Searching [%x] in %5d elem from %x\n", hash, len, start);
9189
int b = 0;
9290
int e = len;
9391
while (b <= e) {
@@ -135,6 +133,10 @@ public String toString() {
135133
}
136134
return "H[" + hash + "] num = " + numChildren + " tag = " + tagString;
137135
}
136+
137+
public int getChildOffset() {
138+
return childOffset;
139+
}
138140
}
139141

140142
public EftarFileReader(String file) throws FileNotFoundException {

opengrok-web/src/main/java/org/opengrok/web/DirectoryListing.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public List<String> extraListTo(String contextPath, File dir, Writer out,
170170
if (desc != null) {
171171
parentFNode = desc.getNode(path);
172172
if (parentFNode != null) {
173-
offset = parentFNode.childOffset;
173+
offset = parentFNode.getChildOffset();
174174
}
175175
}
176176

0 commit comments

Comments
 (0)