RFR 4947890 : Minimize JNI upcalls in system property initialization
    Brent Christian 
    brent.christian at oracle.com
       
    Mon Nov 26 23:12:04 UTC 2018
    
    
  
Hi,
On 11/19/18 3:37 PM, Roger Riggs wrote:
>> Raw::xxx_NDX are initialized to 1 + previous_NDX.  It's a general
>> good approach to increment the index but I find it error-prone and
>> hard to catch mistake since the (adjacent) variable names look
>> so alike. Perhaps some form of verification or assertion to ensure
>> the indices are correctly initialized.
 >
> Added a test that uses reflection to verify the uniqueness and sequence.
The test says:
   * Check that the Raw._*_NDX indexes are sequential
   and followed by the FIXED_LENGTH value.
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
though the code does not verify that FIXED_LENGTH is the final value.  I 
don't know that it's all that important to do, but I thought I'd point 
it out.
Thanks,
-Brent
    
    
More information about the hotspot-runtime-dev
mailing list