bahlulh commented on a change in pull request #4164: NIFI-5481 - Add new 
providers of protected sensitive configuration values
URL: https://github.com/apache/nifi/pull/4164#discussion_r404906870
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/sensitive/ProtectedNiFiProperties.java
 ##########
 @@ -359,40 +373,22 @@ public NiFiProperties getUnprotectedProperties() throws 
SensitivePropertyProtect
                 }
             }
 
-            NiFiProperties unprotected = new 
StandardNiFiProperties(rawProperties);
-
-            return unprotected;
+            return new StandardNiFiProperties(rawProperties);
         } else {
             logger.debug("No protected properties");
             return getInternalNiFiProperties();
         }
     }
 
-    /**
-     * Registers a new {@link SensitivePropertyProvider}. This method will 
throw a {@link UnsupportedOperationException} if a provider is already 
registered for the protection scheme.
-     *
-     * @param sensitivePropertyProvider the provider
-     */
-    void addSensitivePropertyProvider(SensitivePropertyProvider 
sensitivePropertyProvider) {
-        if (sensitivePropertyProvider == null) {
-            throw new IllegalArgumentException("Cannot add null 
SensitivePropertyProvider");
-        }
-
-        if 
(getSensitivePropertyProviders().containsKey(sensitivePropertyProvider.getIdentifierKey()))
 {
-            throw new UnsupportedOperationException("Cannot overwrite existing 
sensitive property provider registered for " + 
sensitivePropertyProvider.getIdentifierKey());
-        }
-
-        
getSensitivePropertyProviders().put(sensitivePropertyProvider.getIdentifierKey(),
 sensitivePropertyProvider);
-    }
-
-    private String getDefaultProtectionScheme() {
-        if (!getSensitivePropertyProviders().isEmpty()) {
-            List<String> schemes = new 
ArrayList<>(getSensitivePropertyProviders().keySet());
-            Collections.sort(schemes);
-            return schemes.get(0);
-        } else {
-            throw new IllegalStateException("No registered protection 
schemes");
-        }
+    @Override
+    public String toString() {
 
 Review comment:
   Why do you need this?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to