RFR: 8284490: Remove finalizer method in java.security.jgss [v8]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Tue Apr 26 05:08:55 UTC 2022


On Tue, 26 Apr 2022 01:53:43 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits:
>> 
>>  - Merge and resovle merge conflict
>>  - change the calling order in dispose()
>>  - More code cleanup
>>  - re-org the code per feedback
>>  - Update to set context method
>>  - add test cases
>>  - Merge
>>  - Update copyright year
>>  - the object reference issue for Cleaner
>>  - 8284490: Remove finalizer method in java.security.jgss
>
> src/java.security.jgss/share/classes/sun/security/jgss/wrapper/GSSNameElement.java line 54:
> 
>> 52:     private final Cleaner.Cleanable cleanable;
>> 53: 
>> 54:     long pName = 0; // Pointer to the gss_name_t structure
> 
> Can this be final?

Did you mean pName? The dispose() method will reset it to zero.  'pName" is used a lot in native implementation.  It may be doable to make it final, but it may be more complicated than I could expect.  I would like to leave it as it is in this PR.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8136



More information about the security-dev mailing list