From 3c0bf54c4e9c27a18f4e3f1a63be28c389f937d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Wed, 20 Sep 2023 09:51:00 +0200 Subject: [PATCH] TarFile: avoid Implicit narrowing conversion skip() uses long integer --- .../src/org/eclipse/pde/api/tools/internal/util/TarFile.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java index 835b8bf96e..2ab63daed8 100644 --- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java +++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java @@ -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; @@ -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; }