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/08/17 21:46:50 UTC

[GitHub] milleruntime commented on a change in pull request #602: Reduced use of SiteConfiguration.getInstance()

milleruntime commented on a change in pull request #602: Reduced use of SiteConfiguration.getInstance()
URL: https://github.com/apache/accumulo/pull/602#discussion_r211040248
 
 

 ##########
 File path: core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
 ##########
 @@ -106,16 +106,16 @@ public static void cleanupKeyFile() throws Exception {
 
   @Before
   public void turnCryptoOnInSiteConfig() {
-    SiteConfiguration.getInstance().set(Property.INSTANCE_CRYPTO_SERVICE,
-        AESCryptoService.class.getName());
-    SiteConfiguration.getInstance().set("instance.crypto.opts.kekId", "file:///tmp/testAESFile");
-    SiteConfiguration.getInstance().set("instance.crypto.opts.keyManager", "uri");
+    SiteConfiguration siteConfig = SiteConfiguration.getInstance();
+    siteConfig.set(Property.INSTANCE_CRYPTO_SERVICE, AESCryptoService.class.getName());
+    siteConfig.set("instance.crypto.opts.kekId", "file:///tmp/testAESFile");
+    siteConfig.set("instance.crypto.opts.keyManager", "uri");
     CryptoServiceFactory.resetInstance();
   }
 
   public static void turnCryptoOffInSiteConfig() {
-    SiteConfiguration.getInstance().set(Property.INSTANCE_CRYPTO_SERVICE,
-        NoCryptoService.class.getName());
+    SiteConfiguration siteConfig = SiteConfiguration.getInstance();
+    siteConfig.set(Property.INSTANCE_CRYPTO_SERVICE, NoCryptoService.class.getName());
 
 Review comment:
   Yeah this was a temporary hack, which I am working on removing.

----------------------------------------------------------------
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