mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8340885: Desugar ZipCoder.Comparison
Reviewed-by: lancea, eirbjo
This commit is contained in:
parent
120463dc90
commit
d8790aa048
2 changed files with 24 additions and 25 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue