laminelam commented on code in PR #826:
URL: https://github.com/apache/solr/pull/826#discussion_r866137544
##########
solr/solrj/src/java/org/apache/solr/common/cloud/VMParamsSingleSetCredentialsDigestZkCredentialsProvider.java:
##########
@@ -16,64 +16,66 @@
*/
package org.apache.solr.common.cloud;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.StringUtils;
+import org.apache.solr.common.cloud.acl.DigestZkCredentialsProvider;
+import org.apache.solr.common.cloud.acl.VMParamsZkCredentialsInjector;
+import org.apache.solr.common.cloud.acl.ZkCredentialsInjector;
+/**
+ * Deprecated in favor of a combination of {@link DigestZkCredentialsProvider}
and {@link
+ * VMParamsZkCredentialsInjector}.
+ *
+ * <pre>
+ * Current implementation delegates to {@link DigestZkCredentialsProvider}
with an injected {@link VMParamsZkCredentialsInjector}
+ * </pre>
+ */
+@Deprecated
public class VMParamsSingleSetCredentialsDigestZkCredentialsProvider
extends DefaultZkCredentialsProvider {
- public static final String DEFAULT_DIGEST_FILE_VM_PARAM_NAME =
"zkDigestCredentialsFile";
- public static final String DEFAULT_DIGEST_USERNAME_VM_PARAM_NAME =
"zkDigestUsername";
- public static final String DEFAULT_DIGEST_PASSWORD_VM_PARAM_NAME =
"zkDigestPassword";
-
- static Properties readCredentialsFile(String pathToFile) throws
SolrException {
- Properties props = new Properties();
- try (Reader reader =
- new InputStreamReader(new FileInputStream(pathToFile),
StandardCharsets.UTF_8)) {
- props.load(reader);
- } catch (IOException ioExc) {
- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, ioExc);
- }
- return props;
- }
+ public static final String DEFAULT_DIGEST_USERNAME_VM_PARAM_NAME =
Review Comment:
Completely agree, will add @ see to the javadoc
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]