You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/04/22 13:45:59 UTC

[GitHub] [ignite-3] ibessonov opened a new pull request #104: IGNITE-14561 Fix of javadoc warnings in configuration module.

ibessonov opened a new pull request #104:
URL: https://github.com/apache/ignite-3/pull/104


   Signed-off-by: ibessonov <be...@gmail.com>


-- 
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:
users@infra.apache.org



[GitHub] [ignite-3] ibessonov merged pull request #104: IGNITE-14561 Fix of javadoc warnings in configuration module.

Posted by GitBox <gi...@apache.org>.
ibessonov merged pull request #104:
URL: https://github.com/apache/ignite-3/pull/104


   


-- 
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:
users@infra.apache.org



[GitHub] [ignite-3] sashapolo commented on a change in pull request #104: IGNITE-14561 Fix of javadoc warnings in configuration module.

Posted by GitBox <gi...@apache.org>.
sashapolo commented on a change in pull request #104:
URL: https://github.com/apache/ignite-3/pull/104#discussion_r618501981



##########
File path: modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Utils.java
##########
@@ -59,7 +59,12 @@ public static ClassName getConfigurationInterfaceName(ClassName schemaClassName)
         );
     }
 
-    /** */
+    /**
+     * Get {@link ClassName} for configuration node object class.

Review comment:
       ```suggestion
        * Get {@link ClassName} for a configuration node object class.
   ```

##########
File path: modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/ConfigurationElement.java
##########
@@ -47,27 +54,37 @@ public ConfigurationElement(TypeName type, String name, TypeName view, TypeName
         this.change = change;
     }
 
-    /** */
+    /**
+     * @return Name of configuration element.

Review comment:
       ```suggestion
        * @return Name of a configuration element.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -219,10 +236,16 @@ public void initialize(ConfigurationType storageType) {
         }
     }
 
-    /** */
+    /**
+     * Change configuration.
+     * @param source Configuration source to create patch from it.

Review comment:
       ```suggestion
        * @param source Configuration source to create patch from.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -219,10 +236,16 @@ public void initialize(ConfigurationType storageType) {
         }
     }
 
-    /** */
+    /**
+     * Change configuration.
+     * @param source Configuration source to create patch from it.
+     * @param storage Expected storage for the changes. Can be null, this will mean that derived storage will be used

Review comment:
       ```suggestion
        * @param storage Expected storage for the changes. If null, a derived storage will be used
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/RootKey.java
##########
@@ -22,15 +22,24 @@
 
 /** */
 public abstract class RootKey<T extends ConfigurationTree<VIEW, ?>, VIEW> {
-    /** */
+    /**
+     * @return Name of the configuration root.
+     */
     public abstract String key();
 
-    /** */
+    /**
+     * @return Configuration type of the root.
+     */
     protected abstract ConfigurationType type();
 
-    /** */
+    /**
+     * @return New instance of the inner node for the root.
+     */
     protected abstract InnerNode createRootNode();
 
-    /** */
+    /**
+     * @param changer Configuration changer instance.
+     * @return New instance of the puvlic tree for the root.

Review comment:
       ```suggestion
        * @return New instance of the public tree for the root.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/annotation/Value.java
##########
@@ -49,8 +49,9 @@
     boolean immutable() default false;
 
     /**
-     * Indicator that current cpnfoguration value has default value. Value itself is derived from instantiated object
+     * Indicator that current configuration value has default value. Value itself is derived from instantiated object

Review comment:
       ```suggestion
        * Indicates that the current configuration value has a default value. Value itself is derived from the instantiated object
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/tree/TraversableTreeNode.java
##########
@@ -22,6 +22,8 @@
     /**
      * @param key Name of the node retrieved from its holder object.
      * @param visitor Configuration visitor.
+     * @param <T> Parameter type of passed visitor.

Review comment:
       ```suggestion
        * @param <T> Parameter type of the passed visitor.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -119,29 +120,42 @@ public ConfigurationChanger(Notificator notificator) {
         this.notificator = notificator;
     }
 
-    /** */
+    /**
+     * Add single validator instance.
+     * @param annotationType Annotation type for validated fields.
+     * @param validator Validator instance for this annotation.
+     * @param <A> Annotation type.
+     */
     public <A extends Annotation> void addValidator(Class<A> annotationType, Validator<A, ?> validator) {
         validators
             .computeIfAbsent(annotationType, a -> new HashSet<>())
             .add(validator);
     }
 
-    /** */
-    public <A extends Annotation> void addValidators(Class<A> annotationType, Set<Validator<A, ?>> validators) {
+    /**
+     * Add multiple validators instances.

Review comment:
       ```suggestion
        * Adds multiple validators instances.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -219,10 +236,16 @@ public void initialize(ConfigurationType storageType) {
         }
     }
 
-    /** */
+    /**
+     * Change configuration.

Review comment:
       ```suggestion
        * Changes the configuration.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -119,29 +120,42 @@ public ConfigurationChanger(Notificator notificator) {
         this.notificator = notificator;
     }
 
-    /** */
+    /**
+     * Add single validator instance.
+     * @param annotationType Annotation type for validated fields.
+     * @param validator Validator instance for this annotation.
+     * @param <A> Annotation type.
+     */
     public <A extends Annotation> void addValidator(Class<A> annotationType, Validator<A, ?> validator) {
         validators
             .computeIfAbsent(annotationType, a -> new HashSet<>())
             .add(validator);
     }
 
-    /** */
-    public <A extends Annotation> void addValidators(Class<A> annotationType, Set<Validator<A, ?>> validators) {
+    /**
+     * Add multiple validators instances.
+     * @param annotationType Annotation type for validated fields.
+     * @param validators Set of validator instancec for this annotation.
+     */
+    public void addValidators(Class<? extends Annotation> annotationType, Set<Validator<? extends Annotation, ?>> validators) {
         this.validators
             .computeIfAbsent(annotationType, a -> new HashSet<>())
             .addAll(validators);
     }
 
-    /** */
+    /**
+     * Register additional root key.

Review comment:
       ```suggestion
        * Registers an additional root key.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationTree.java
##########
@@ -20,21 +20,23 @@
 import java.util.Map;
 import java.util.concurrent.Future;
 import java.util.function.Consumer;
-import org.apache.ignite.configuration.validation.ConfigurationValidationException;
 
 /**
  * Configuration tree with configuration values and other configuration trees as child nodes.
  * @param <VIEW> Value type of the node.
  * @param <CHANGE> Type of the object that changes this node's value.
  */
 public interface ConfigurationTree<VIEW, CHANGE> extends ConfigurationProperty<VIEW, CHANGE> {
-    /** Children of the tree. */
+    /**
+     * Children of the tree.
+     * @return Map from {@code String} to corresponding {@link ConfigurationProperty}.
+     */
     Map<String, ConfigurationProperty<?, ?>> members();
 
     /**
      * Change this configuration node value.
      * @param change CHANGE object.
-     * @throws ConfigurationValidationException If validation failed.
+     * @return Future that is completed when configuration is changed or change has failed.

Review comment:
       ```suggestion
        * @return Future that is completed when configuration change is finished either successfully or not.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -119,29 +120,42 @@ public ConfigurationChanger(Notificator notificator) {
         this.notificator = notificator;
     }
 
-    /** */
+    /**
+     * Add single validator instance.

Review comment:
       ```suggestion
        * Adds a single validator instance.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -185,7 +199,10 @@ public void register(ConfigurationStorage configurationStorage) throws Configura
         ));
     }
 
-    /** */
+    /**
+     * Initialize configuration storage - read data and set default values for missing configuration properties.

Review comment:
       ```suggestion
        * Initializes the configuration storage - reads data and sets default values for missing configuration properties.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationTree.java
##########
@@ -20,21 +20,23 @@
 import java.util.Map;
 import java.util.concurrent.Future;
 import java.util.function.Consumer;
-import org.apache.ignite.configuration.validation.ConfigurationValidationException;
 
 /**
  * Configuration tree with configuration values and other configuration trees as child nodes.
  * @param <VIEW> Value type of the node.
  * @param <CHANGE> Type of the object that changes this node's value.
  */
 public interface ConfigurationTree<VIEW, CHANGE> extends ConfigurationProperty<VIEW, CHANGE> {
-    /** Children of the tree. */
+    /**
+     * Children of the tree.
+     * @return Map from {@code String} to corresponding {@link ConfigurationProperty}.

Review comment:
       ```suggestion
        * @return Map from {@code String} to a corresponding {@link ConfigurationProperty}.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationRegistry.java
##########
@@ -92,12 +93,22 @@
         configurationStorages.forEach(changer::register);
     }
 
-    /** */
+    /**
+     * Start storage configurations.
+     * @param storageType Storage type.
+     */
     public void startStorageConfigurations(ConfigurationType storageType) {
         changer.initialize(storageType);
     }
 
-    /** */
+    /**
+     * Get public configuration tree.

Review comment:
       ```suggestion
        * Gets the public configuration tree.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationRegistry.java
##########
@@ -92,12 +93,22 @@
         configurationStorages.forEach(changer::register);
     }
 
-    /** */
+    /**
+     * Start storage configurations.

Review comment:
       ```suggestion
        * Starts storage configurations.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationTree.java
##########
@@ -20,21 +20,23 @@
 import java.util.Map;
 import java.util.concurrent.Future;
 import java.util.function.Consumer;
-import org.apache.ignite.configuration.validation.ConfigurationValidationException;
 
 /**
  * Configuration tree with configuration values and other configuration trees as child nodes.
  * @param <VIEW> Value type of the node.
  * @param <CHANGE> Type of the object that changes this node's value.
  */
 public interface ConfigurationTree<VIEW, CHANGE> extends ConfigurationProperty<VIEW, CHANGE> {
-    /** Children of the tree. */
+    /**
+     * Children of the tree.
+     * @return Map from {@code String} to corresponding {@link ConfigurationProperty}.
+     */
     Map<String, ConfigurationProperty<?, ?>> members();
 
     /**
      * Change this configuration node value.

Review comment:
       ```suggestion
        * Changes this configuration node value.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/RootKeyImpl.java
##########
@@ -39,7 +40,12 @@
     /** */
     private final BiFunction<RootKey<T, VIEW>, ConfigurationChanger, T> publicRootCreator;
 
-    /** */
+    /**
+     * @param rootName Name of the root as described in {@link ConfigurationRoot#rootName()}.
+     * @param storageType Storage class as described in {@link ConfigurationRoot#type()}.
+     * @param rootSupplier Closure to instantiate internal configuration tree roots.
+     * @param publicRootCreator Function to create public user-facing tree instance.

Review comment:
       ```suggestion
        * @param publicRootCreator Function to create a public user-facing tree instance.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -119,29 +120,42 @@ public ConfigurationChanger(Notificator notificator) {
         this.notificator = notificator;
     }
 
-    /** */
+    /**
+     * Add single validator instance.
+     * @param annotationType Annotation type for validated fields.
+     * @param validator Validator instance for this annotation.
+     * @param <A> Annotation type.
+     */
     public <A extends Annotation> void addValidator(Class<A> annotationType, Validator<A, ?> validator) {
         validators
             .computeIfAbsent(annotationType, a -> new HashSet<>())
             .add(validator);
     }
 
-    /** */
-    public <A extends Annotation> void addValidators(Class<A> annotationType, Set<Validator<A, ?>> validators) {
+    /**
+     * Add multiple validators instances.
+     * @param annotationType Annotation type for validated fields.
+     * @param validators Set of validator instancec for this annotation.
+     */
+    public void addValidators(Class<? extends Annotation> annotationType, Set<Validator<? extends Annotation, ?>> validators) {
         this.validators
             .computeIfAbsent(annotationType, a -> new HashSet<>())
             .addAll(validators);
     }
 
-    /** */
+    /**
+     * Register additional root key.
+     * @param rootKey Root key instance.
+     */
     public void addRootKey(RootKey<?, ?> rootKey) {
         assert !storageInstances.containsKey(rootKey.type());
 
         rootKeys.put(rootKey.key(), rootKey);
     }
 
     /**
-     * Register changer.
+     * Register storage.

Review comment:
       ```suggestion
        * Registers a storage.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/annotation/Value.java
##########
@@ -49,8 +49,9 @@
     boolean immutable() default false;
 
     /**
-     * Indicator that current cpnfoguration value has default value. Value itself is derived from instantiated object
+     * Indicator that current configuration value has default value. Value itself is derived from instantiated object
      * of corresponding schema type. This means that default is not necessarily a constant value.

Review comment:
       ```suggestion
        * of a corresponding schema type. This means that the default is not necessarily a constant value.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/MemberKey.java
##########
@@ -29,7 +29,11 @@
     /** Name of the field. */
     private final String fieldName;
 
-    /** Constructor. */
+    /**
+     * Constructor.
+     * @param clazz Class that contains member.

Review comment:
       ```suggestion
        * @param clazz Class that contains a member.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/SuperRoot.java
##########
@@ -42,36 +42,52 @@ private SuperRoot(SuperRoot superRoot) {
         allRootKeys = superRoot.allRootKeys;
     }
 
-    /** */
+    /**
+     * @param rootKeys Shared map of all available root keys.
+     */
     public SuperRoot(Map<String, RootKey<?, ?>> rootKeys) {
         allRootKeys = rootKeys;
     }
 
-    /** */
+    /**
+     * @param rootKeys Shared map of all available root keys.
+     * @param roots Map of roots belonging to this super root.
+     */
     public SuperRoot(Map<String, RootKey<?, ?>> rootKeys, Map<RootKey<?, ?>, InnerNode> roots) {
         allRootKeys = rootKeys;
 
         for (Map.Entry<RootKey<?, ?>, InnerNode> entry : roots.entrySet())
             this.roots.put(entry.getKey().key(), entry.getValue());
     }
 
-    /** */
+    /**
+     * @param rootKeys Shared map of all available root keys.
+     * @param superRoots List of super roots to merge into even more superior root.
+     */
     public SuperRoot(Map<String, RootKey<?, ?>> rootKeys, List<SuperRoot> superRoots) {
         this(rootKeys);
 
         for (SuperRoot superRoot : superRoots)
             roots.putAll(superRoot.roots);
     }
 
-    /** */
+    /**
+     * Add root to the super root.
+     * @param rootKey Root key.
+     * @param root Root node.
+     */
     public void addRoot(RootKey<?, ?> rootKey, InnerNode root) {
         assert !roots.containsKey(rootKey.key()) : rootKey.key() + " : " + roots;
         assert allRootKeys.get(rootKey.key()) == rootKey : rootKey.key() + " : " + allRootKeys;
 
         roots.put(rootKey.key(), root);
     }
 
-    /** */
+    /**
+     * Get root.

Review comment:
       ```suggestion
        * Gets a root.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/rest/JsonConverter.java
##########
@@ -40,7 +40,9 @@
 import static org.apache.ignite.configuration.internal.util.ConfigurationUtil.join;
 
 public class JsonConverter {
-    /** */
+    /**
+     * @return Cisitor to cteate JSON representations.

Review comment:
       ```suggestion
        * @return Visitor to create JSON representations.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/notifications/ConfigurationNotificationEvent.java
##########
@@ -29,18 +29,18 @@
  */
 public interface ConfigurationNotificationEvent<VIEW> {
     /**
-     * Previous value of the updated configuration.
+     * @return Previous value of the updated configuration.
      */
     @Nullable VIEW oldValue();
 
     /**
-     * Updated value of the configuration.
+     * @return Updated value of the configuration.
      */
     @Nullable VIEW newValue();
 
     /**
-     * Monotonously increasing counter, linked to the specific storage for current configuration values. Gives you a
-     * unique change identifier inside a specific configuration storage.
+     * @return Monotonously increasing counter, linked to the specific storage for current configuration values. Gives
+     * you a unique change identifier inside a specific configuration storage.

Review comment:
       ```suggestion
        * a unique change identifier inside a specific configuration storage.
   ```

##########
File path: modules/rest/src/main/java/org/apache/ignite/rest/presentation/json/JsonConverter.java
##########
@@ -41,7 +41,9 @@
 
 /** */
 public class JsonConverter {
-    /** */
+    /**
+     * @return Cisitor to cteate JSON representations.

Review comment:
       ```suggestion
        * @return Visitor to create JSON representations.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/tree/InnerNode.java
##########
@@ -43,6 +43,7 @@
      * Order of fields must be the same as they are described in configuration schema.
      *
      * @param visitor Configuration visitor.
+     * @param <T> Parameter type of passed visitor.

Review comment:
       ```suggestion
        * @param <T> Parameter type of the passed visitor.
   ```

##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/SuperRoot.java
##########
@@ -42,36 +42,52 @@ private SuperRoot(SuperRoot superRoot) {
         allRootKeys = superRoot.allRootKeys;
     }
 
-    /** */
+    /**
+     * @param rootKeys Shared map of all available root keys.
+     */
     public SuperRoot(Map<String, RootKey<?, ?>> rootKeys) {
         allRootKeys = rootKeys;
     }
 
-    /** */
+    /**
+     * @param rootKeys Shared map of all available root keys.
+     * @param roots Map of roots belonging to this super root.
+     */
     public SuperRoot(Map<String, RootKey<?, ?>> rootKeys, Map<RootKey<?, ?>, InnerNode> roots) {
         allRootKeys = rootKeys;
 
         for (Map.Entry<RootKey<?, ?>, InnerNode> entry : roots.entrySet())
             this.roots.put(entry.getKey().key(), entry.getValue());
     }
 
-    /** */
+    /**
+     * @param rootKeys Shared map of all available root keys.
+     * @param superRoots List of super roots to merge into even more superior root.
+     */
     public SuperRoot(Map<String, RootKey<?, ?>> rootKeys, List<SuperRoot> superRoots) {
         this(rootKeys);
 
         for (SuperRoot superRoot : superRoots)
             roots.putAll(superRoot.roots);
     }
 
-    /** */
+    /**
+     * Add root to the super root.

Review comment:
       ```suggestion
        * Adds a root to the super root.
   ```




-- 
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:
users@infra.apache.org



[GitHub] [ignite-3] ibessonov commented on pull request #104: IGNITE-14561 Fix of javadoc warnings in configuration module.

Posted by GitBox <gi...@apache.org>.
ibessonov commented on pull request #104:
URL: https://github.com/apache/ignite-3/pull/104#issuecomment-825524666


   Maven suite fails because of https://issues.apache.org/jira/browse/IGNITE-14630


-- 
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:
users@infra.apache.org