haridsv opened a new pull request, #8354:
URL: https://github.com/apache/hbase/pull/8354

   DefaultCipherProvider and CryptoCipherProvider initialized their conf field 
inline with HBaseConfiguration.create(), parsing hbase-default.xml and 
hbase-site.xml on every construction. The value was immediately discarded: 
Encryption.getCipherProvider() builds the provider via 
ReflectionUtils.newInstance(), which runs the no-arg constructor and then calls 
setConf(), overwriting the field. The eager parse was pure waste.
   
   Drop the inline initializer so conf is set only via setConf(), and add a 
fail-fast Preconditions guard in getConf() so a caller that forgets setConf() 
fails loudly instead of NPE-ing deep inside cipher construction. Mark the 
test-only getInstance() accessor as LimitedPrivate(UNITTEST). Add guard tests 
covering both providers.
   
   Generated-by: Claude Code (Opus 4.8)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to