fapifta commented on code in PR #6855:
URL: https://github.com/apache/ozone/pull/6855#discussion_r1654696969
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/utils/CertificateCodec.java:
##########
@@ -70,31 +54,17 @@ public class CertificateCodec {
private static final Logger LOG =
LoggerFactory.getLogger(CertificateCodec.class);
- private final SecurityConfig securityConfig;
- private final Path location;
- private final Set<PosixFilePermission> permissionSet =
- Stream.of(OWNER_READ, OWNER_WRITE, OWNER_EXECUTE)
- .collect(Collectors.toSet());
+
/**
* Creates a CertificateCodec with component name.
- *
- * @param config - Security Config.
- * @param component - Component String.
*/
- public CertificateCodec(SecurityConfig config, String component) {
- this.securityConfig = config;
- this.location = securityConfig.getCertificateLocation(component);
- }
-
- public CertificateCodec(SecurityConfig config, Path certPath) {
- this.securityConfig = config;
- this.location = certPath;
+ public CertificateCodec() {
Review Comment:
We don't need to define this constructor, as it is equivalent with the
default constructor.
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/utils/CertificateCodec.java:
##########
@@ -70,31 +54,17 @@ public class CertificateCodec {
private static final Logger LOG =
LoggerFactory.getLogger(CertificateCodec.class);
- private final SecurityConfig securityConfig;
- private final Path location;
- private final Set<PosixFilePermission> permissionSet =
- Stream.of(OWNER_READ, OWNER_WRITE, OWNER_EXECUTE)
- .collect(Collectors.toSet());
+
/**
* Creates a CertificateCodec with component name.
- *
- * @param config - Security Config.
- * @param component - Component String.
*/
- public CertificateCodec(SecurityConfig config, String component) {
- this.securityConfig = config;
- this.location = securityConfig.getCertificateLocation(component);
- }
-
- public CertificateCodec(SecurityConfig config, Path certPath) {
- this.securityConfig = config;
- this.location = certPath;
+ public CertificateCodec() {
Review Comment:
We don't need to define this constructor, as it is equivalent with the
default constructor.
--
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]