8289431: (zipfs) Avoid redundant HashMap.get in ZipFileSystemProvider.removeFileSystem

Reviewed-by: lancea, attila
This commit is contained in:
Andrey Turbanov 2022-07-04 06:54:09 +00:00
parent 649f2d8835
commit 8e7a3cb5ab

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -308,8 +308,7 @@ public class ZipFileSystemProvider extends FileSystemProvider {
} catch (PrivilegedActionException e) {
throw (IOException) e.getException();
}
if (filesystems.get(zfpath) == zfs)
filesystems.remove(zfpath);
filesystems.remove(zfpath, zfs);
}
}
}