Skip to content

Commit c2d6f78

Browse files
author
Vladimir Kotal
committed
property changes for CountingWriter
1 parent 304f539 commit c2d6f78

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,14 +1666,13 @@ public int hashCode() {
16661666
return hash;
16671667
}
16681668

1669-
private class CountingWriter extends Writer {
1669+
private static class CountingWriter extends Writer {
16701670
private long count;
1671-
private Writer out;
1671+
private final Writer out;
16721672

16731673
CountingWriter(Writer out) {
16741674
super(out);
16751675
this.out = out;
1676-
this.count = 0;
16771676
}
16781677

16791678
@Override
@@ -1721,8 +1720,8 @@ private String getXrefPath(String path) {
17211720
*/
17221721
private CountingWriter newXrefWriter(String path, File transientXref, boolean compressed) throws IOException {
17231722
return new CountingWriter(new BufferedWriter(new OutputStreamWriter(compressed ?
1724-
new GZIPOutputStream(new FileOutputStream(transientXref)) :
1725-
new FileOutputStream(transientXref))));
1723+
new GZIPOutputStream(new FileOutputStream(transientXref)) :
1724+
new FileOutputStream(transientXref))));
17261725
}
17271726

17281727
LockFactory pickLockFactory(RuntimeEnvironment env) {

0 commit comments

Comments
 (0)