Skip to content

Commit ec21286

Browse files
committed
Rename private instance variables, use camel case
1 parent c43928b commit ec21286

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,17 @@ public static boolean matches(final byte[] signature, final int length) {
124124

125125
private boolean entryEOF;
126126

127-
private final byte[] tmpbuf = new byte[4096];
127+
private final byte[] tmpBuf = new byte[4096];
128128

129129
private long crc;
130130

131131
/** Cached buffer - must only be used locally in the class (COMPRESS-172 - reduce garbage collection). */
132-
private final byte[] twoBytesBuf = new byte[2];
132+
private final byte[] buffer2 = new byte[2];
133133

134134
/** Cached buffer - must only be used locally in the class (COMPRESS-172 - reduce garbage collection). */
135-
private final byte[] fourBytesBuf = new byte[4];
135+
private final byte[] buffer4 = new byte[4];
136136

137-
private final byte[] sixBytesBuf = new byte[6];
137+
private final byte[] buffer6 = new byte[6];
138138

139139
private final int blockSize;
140140

@@ -261,15 +261,15 @@ public CpioArchiveEntry getNextCPIOEntry() throws IOException {
261261
if (this.entry != null) {
262262
closeEntry();
263263
}
264-
readFully(twoBytesBuf, 0, twoBytesBuf.length);
265-
if (CpioUtil.byteArray2long(twoBytesBuf, false) == MAGIC_OLD_BINARY) {
264+
readFully(buffer2, 0, buffer2.length);
265+
if (CpioUtil.byteArray2long(buffer2, false) == MAGIC_OLD_BINARY) {
266266
this.entry = readOldBinaryEntry(false);
267-
} else if (CpioUtil.byteArray2long(twoBytesBuf, true) == MAGIC_OLD_BINARY) {
267+
} else if (CpioUtil.byteArray2long(buffer2, true) == MAGIC_OLD_BINARY) {
268268
this.entry = readOldBinaryEntry(true);
269269
} else {
270-
System.arraycopy(twoBytesBuf, 0, sixBytesBuf, 0, twoBytesBuf.length);
271-
readFully(sixBytesBuf, twoBytesBuf.length, fourBytesBuf.length);
272-
final String magicString = ArchiveUtils.toAsciiString(sixBytesBuf);
270+
System.arraycopy(buffer2, 0, buffer6, 0, buffer2.length);
271+
readFully(buffer6, buffer2.length, buffer4.length);
272+
final String magicString = ArchiveUtils.toAsciiString(buffer6);
273273
switch (magicString) {
274274
case MAGIC_NEW:
275275
this.entry = readNewEntry(false);
@@ -497,7 +497,7 @@ private byte[] readRange(final int len) throws IOException {
497497

498498
private int skip(final int length) throws IOException {
499499
// bytes cannot be more than 3 bytes
500-
return length > 0 ? readFully(fourBytesBuf, 0, length) : 0;
500+
return length > 0 ? readFully(buffer4, 0, length) : 0;
501501
}
502502

503503
/**
@@ -519,10 +519,10 @@ public long skip(final long n) throws IOException {
519519

520520
while (total < max) {
521521
int len = max - total;
522-
if (len > this.tmpbuf.length) {
523-
len = this.tmpbuf.length;
522+
if (len > this.tmpBuf.length) {
523+
len = this.tmpBuf.length;
524524
}
525-
len = read(this.tmpbuf, 0, len);
525+
len = read(this.tmpBuf, 0, len);
526526
if (len == -1) {
527527
this.entryEOF = true;
528528
break;

0 commit comments

Comments
 (0)