8340885: Desugar ZipCoder.Comparison

Reviewed-by: lancea, eirbjo
This commit is contained in:
Claes Redestad 2024-09-25 13:04:46 +00:00
parent 120463dc90
commit d8790aa048
2 changed files with 24 additions and 25 deletions

View file

@ -1869,15 +1869,15 @@ public class ZipFile implements ZipConstants, Closeable {
// Compare the lookup name with the name encoded in the CEN
switch (zc.compare(name, cen, noff, nlen, addSlash)) {
case EXACT_MATCH:
case ZipCoder.EXACT_MATCH:
// We found an exact match for "name"
return new EntryPos(name, pos);
case DIRECTORY_MATCH:
case ZipCoder.DIRECTORY_MATCH:
// We found the directory "name/"
// Track its position, then continue the search for "name"
dirPos = pos;
break;
case NO_MATCH:
case ZipCoder.NO_MATCH:
// Hash collision, continue searching
}
}