-
Enhancement
-
Resolution: Fixed
-
P4
-
8, 9, 10, 11
-
b26
-
x86_64
-
windows_7
ADDITIONAL SYSTEM INFORMATION :
Java: 1.8.0_172; Java HotSpot(TM) 64-Bit Server VM 25.73-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; es_ES (nb)
A DESCRIPTION OF THE PROBLEM :
Despite skip method receives and return long values the internal code uses integer therefore it's limited to Integer.MAX_VALUE. This is a behavior not specified in Javadoc and probably breaks the InputStream contract.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
try(ZipFile zipFile=new ZipFile("<zipfile>")){
long counter=0l;
try(InputStream stream=actual.openStream(zipFile, "<zipentry greater than Integer.MAX_VALUE>")){
actual=stream.skip(Long.valueOf(Integer.MAX_VALUE)+1l);
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
actual==Long.valueOf(Integer.MAX_VALUE)+1l;
ACTUAL -
actual==Long.valueOf(Integer.MAX_VALUE);
CUSTOMER SUBMITTED WORKAROUND :
cycle skip class when skip value is greater than Integer.MAX_VALUE
Java: 1.8.0_172; Java HotSpot(TM) 64-Bit Server VM 25.73-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; es_ES (nb)
A DESCRIPTION OF THE PROBLEM :
Despite skip method receives and return long values the internal code uses integer therefore it's limited to Integer.MAX_VALUE. This is a behavior not specified in Javadoc and probably breaks the InputStream contract.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
try(ZipFile zipFile=new ZipFile("<zipfile>")){
long counter=0l;
try(InputStream stream=actual.openStream(zipFile, "<zipentry greater than Integer.MAX_VALUE>")){
actual=stream.skip(Long.valueOf(Integer.MAX_VALUE)+1l);
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
actual==Long.valueOf(Integer.MAX_VALUE)+1l;
ACTUAL -
actual==Long.valueOf(Integer.MAX_VALUE);
CUSTOMER SUBMITTED WORKAROUND :
cycle skip class when skip value is greater than Integer.MAX_VALUE
- csr for
-
JDK-8333400 InflaterInputStream.skip receives long but it's limited to Integer.MAX_VALUE
-
- Closed
-