Skip to content

Commit

Permalink
TarFile: avoid Implicit narrowing conversion
Browse files Browse the repository at this point in the history
skip() uses long integer
  • Loading branch information
EcljpseB0T authored and HannesWell committed Sep 25, 2023
1 parent f5c8301 commit 514c03b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static class TarInputStream extends FilterInputStream {
private int nextEntry = 0;
private int nextEOF = 0;
private int filepos = 0;
private int bytesread = 0;
private long bytesread = 0;
private TarEntry firstEntry = null;
private String longLinkName = null;

Expand Down Expand Up @@ -90,7 +90,7 @@ private long headerChecksum(byte[] header) {
* @throws IOException
*/
boolean skipToEntry(TarEntry entry) throws TarException, IOException {
int bytestoskip = entry.filepos - bytesread;
long bytestoskip = entry.filepos - bytesread;
if (bytestoskip < 0) {
return false;
}
Expand Down

0 comments on commit 514c03b

Please sign in to comment.