[ 
https://issues.apache.org/jira/browse/GEODE-8905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17289344#comment-17289344
 ] 

ASF GitHub Bot commented on GEODE-8905:
---------------------------------------

kirklund commented on a change in pull request #5989:
URL: https://github.com/apache/geode/pull/5989#discussion_r581393444



##########
File path: 
geode-dunit/src/main/java/org/apache/geode/management/internal/configuration/ClusterConfig.java
##########
@@ -57,6 +59,27 @@ public ClusterConfig(ConfigGroup... configGroups) {
     Collections.addAll(this.groups, configGroups);
   }
 
+  private static Set<String> toSetIgnoringHiddenFiles(String[] array) {
+    if (array == null) {
+      return new HashSet<>();

Review comment:
       If callers cannot modify the returned Set, then you might want to return 
Collections.emptySet() instead.

##########
File path: 
geode-deployment-legacy/src/main/java/org/apache/geode/deployment/impl/legacy/LegacyJarDeploymentService.java
##########
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geode.deployment.impl.legacy;

Review comment:
       Should `org.apache.geode.deployment.impl.legacy` be 
`org.apache.geode.deployment.internal.legacy` instead?

##########
File path: 
geode-deployment-legacy/src/main/java/org/apache/geode/deployment/impl/legacy/LegacyJarDeploymentService.java
##########
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geode.deployment.impl.legacy;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.time.Instant;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.annotations.Experimental;
+import org.apache.geode.deployment.JarDeploymentService;
+import org.apache.geode.internal.DeployedJar;
+import org.apache.geode.internal.JarDeployer;
+import org.apache.geode.logging.internal.log4j.api.LogService;
+import org.apache.geode.management.configuration.Deployment;
+import org.apache.geode.services.result.ServiceResult;
+import org.apache.geode.services.result.impl.Failure;
+import org.apache.geode.services.result.impl.Success;
+
+/**
+ * Implementation of {@link JarDeploymentService} that encpsulates the 
standard method of deploying
+ * jars by delegating to the {@link JarDeployer}.
+ *
+ * @since Geode 1.15
+ */
+@Experimental
+public class LegacyJarDeploymentService implements JarDeploymentService {
+
+  private static final Logger logger = LogService.getLogger();
+
+  private final Map<String, Deployment> deployments;
+  private JarDeployer jarDeployer;

Review comment:
       Just scanning over this class, it looks like `jarDeployer` can probably 
be `final`.

##########
File path: 
geode-core/src/main/java/org/apache/geode/services/result/ServiceResult.java
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+
+package org.apache.geode.services.result;
+
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+/**
+ * The {@link ServiceResult} type is an attempt at the function construct of
+ * <a href="https://www.vavr.io/vavr-docs/#_either";>Either</a>. In this 
implementation a
+ * {@link ServiceResult}
+ * can define either success or failure (error) using the same type.
+ *
+ * @param <SuccessType> the return type for a successful operation.
+ *
+ * @since 1.14.0
+ */
+public interface ServiceResult<SuccessType> extends Result<SuccessType, 
String> {
+  /**
+   * {@inheritDoc}

Review comment:
       I think you should just delete any uses of `@inheritDoc`. You can then 
delete the overridden method definitions since they're already in the super 
interface.




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


> Introduce JarDeploymentService
> ------------------------------
>
>                 Key: GEODE-8905
>                 URL: https://issues.apache.org/jira/browse/GEODE-8905
>             Project: Geode
>          Issue Type: Improvement
>          Components: gfsh, management
>            Reporter: Patrick Johnsn
>            Priority: Major
>              Labels: pull-request-available
>
> Introduce a JarDeploymentService interface that will allow us to interchange 
> the current way of deploying jars with the new modular approach.
>  
> There will be an implementation that delegates to the existing JarDeployer 
> and will maintain current behavior.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to