RFR: 8344179: SecurityManager cleanup in the ZIP and JAR areas [v2]
Lance Andersen
lancea at openjdk.org
Thu Nov 14 13:59:42 UTC 2024
On Thu, 14 Nov 2024 13:21:33 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
>> Please review this PR which cleans up security manager related code in `java.util.zip` and `java.util.jar`:
>>
>> * `JarFile` and `ZipFile` are updated to use `System::getProperty` instead of `GetPropertyAction::privilegedGetProperty`
>> * `ZipFile` is updated to not call SM::checkRead, SM::checkDelete when opening files
>> * `ZipOutputStream` is updated to use `Boolean::getBoolean` instead of `GetBooleanAction::privilegedGetProperty`
>>
>> The field `ZipFile.startsWithLoc` is deliberately left alone, that should be handled separately. I found no SM-dependent code in the ZIP or JAR tests.
>>
>> Testing: This is a cleanup PR, no tests are changed or updated. ZIP and JAR tests run green locally. GHA results pending.
>
> Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision:
>
> Fold lines for System::getProperty when reading enableMultiRelease and inhibitZip64
The changes look reasonable to me.
-------------
Marked as reviewed by lancea (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22099#pullrequestreview-2436155762
More information about the core-libs-dev
mailing list