On Wed, 7 Dec 2022 20:17:57 GMT, Joe Darcy <da...@openjdk.org> wrote:

>> Should the masking out unassigned bits that is done in this method be 
>> extended to the existing `AccessFlag.maskToAccessFlags(mask, location)`;  
>> Instead of throwing `IllegalArgumentException`?
>> The two methods should be consistent in this regard and build their return 
>> values on the meta-data in each AccessFlag.
>
>> Should the masking out unassigned bits that is done in this method be 
>> extended to the existing `AccessFlag.maskToAccessFlags(mask, location)`; 
>> Instead of throwing `IllegalArgumentException`? The two methods should be 
>> consistent in this regard and build their return values on the meta-data in 
>> each AccessFlag.
> 
> My prior comment
> 
> "The difference in exception handling behavior compared to the method w/o a 
> ClassFileFormatVersion argument should at least be discussed."
> 
> was calling attention to the differing strict vs lax handling of unexpected 
> bits in the two overloaded methods. If the policies are not the same, there 
> should at least be prominent text nothing and explaining the difference.

I think both methods should have the same behavior, both should ignore 
unassigned mask bits.
The means removing the @throws from the existing method and repeating the text 
from the new method.
An @apiNote would give it more visibility than the current simple sentence in 
the method javadoc.

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

PR: https://git.openjdk.org/jdk/pull/11399

Reply via email to