You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/03/08 15:36:52 UTC

[GitHub] keith-turner commented on a change in pull request #345: ACCUMULO-4769 Sanity check for valid CryptoModule and KeyEncryptionStrategy in config

keith-turner commented on a change in pull request #345: ACCUMULO-4769 Sanity check for valid CryptoModule and KeyEncryptionStrategy in config
URL: https://github.com/apache/accumulo/pull/345#discussion_r173194102
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
 ##########
 @@ -146,49 +136,40 @@ public static SecretKeyEncryptionStrategy getSecretKeyEncryptionStrategy(String
     return strategy;
   }
 
-  @SuppressWarnings("rawtypes")
   private static SecretKeyEncryptionStrategy instantiateSecreteKeyEncryptionStrategy(String className) {
 
     log.debug("About to instantiate secret key encryption strategy {}", className);
 
     SecretKeyEncryptionStrategy strategy = null;
-    Class keyEncryptionStrategyClazz = null;
+    Class<?> keyEncryptionStrategyClazz = null;
     try {
       keyEncryptionStrategyClazz = AccumuloVFSClassLoader.loadClass(className);
 
 Review comment:
   Could do 
   
   ```java
   Class<? extends SecretKeyEncryptionStrategy> keyEncryptionStrategyClazz;
   try{
     keyEncryptionStrategyClazz = AccumuloVFSClassLoader.loadClass(className).asSubclass(SecretKeyEncryptionStrategy.class);
   
   //would need to catch more exceptions here, but could drop code that uses reflection to look at interfaces
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services