From de70699a9398e0c704ff4fb0467ea53d5f9689c6 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Mon, 20 Mar 2017 13:41:26 +0100 Subject: [PATCH] Fix some javadoc errors (#8873) --- .../java/com/vaadin/annotations/PropertyId.java | 5 ++--- server/src/main/java/com/vaadin/data/HasItems.java | 6 +++--- .../main/java/com/vaadin/data/SelectionModel.java | 2 +- .../src/main/java/com/vaadin/data/Validator.java | 6 +++--- .../main/java/com/vaadin/event/ShortcutAction.java | 8 ++++---- .../java/com/vaadin/server/ClientConnector.java | 2 +- server/src/main/java/com/vaadin/ui/Component.java | 14 +++++++------- .../java/com/vaadin/shared/util/SharedUtil.java | 2 +- 8 files changed, 22 insertions(+), 23 deletions(-) diff --git a/server/src/main/java/com/vaadin/annotations/PropertyId.java b/server/src/main/java/com/vaadin/annotations/PropertyId.java index ecfceda706..c9e51057b2 100644 --- a/server/src/main/java/com/vaadin/annotations/PropertyId.java +++ b/server/src/main/java/com/vaadin/annotations/PropertyId.java @@ -34,9 +34,9 @@ import com.vaadin.data.HasValue; * fields, with the name (ID) of the desired property as the parameter. *

* In following usage example, the text field would be bound to property "foo" - * in the Entity class. + * in the Entity class. *

- *    class Editor extends FormLayout {
+    class Editor extends FormLayout {
         @PropertyId("foo")
         TextField myField = new TextField();
     }
@@ -51,7 +51,6 @@ import com.vaadin.data.HasValue;
         binder.bindInstanceFields(editor);
     }
    
- * * * @since 8.0 * @author Vaadin Ltd diff --git a/server/src/main/java/com/vaadin/data/HasItems.java b/server/src/main/java/com/vaadin/data/HasItems.java index c5b5382c9e..92cd6a435d 100644 --- a/server/src/main/java/com/vaadin/data/HasItems.java +++ b/server/src/main/java/com/vaadin/data/HasItems.java @@ -56,7 +56,7 @@ public interface HasItems extends Component, Serializable { * *
      * 
-     * HasDataProvider listing = new CheckBoxGroup<>();
+     * HasDataProvider<String> listing = new CheckBoxGroup<>();
      * listing.setItems(Arrays.asList("a","b"));
      * ...
      *
@@ -121,11 +121,11 @@ public interface HasItems extends Component, Serializable {
      *
      * 
      * 
-     * HasDataProvider listing = new CheckBoxGroup<>();
+     * HasDataProvider<String> listing = new CheckBoxGroup<>();
      * listing.setItems(Stream.of("a","b"));
      * ...
      *
-     * Collection collection = ((ListDataProvider)listing.getDataProvider()).getItems();
+     * Collection collection = ((ListDataProvider<String>)listing.getDataProvider()).getItems();
      * 
      * 
*

diff --git a/server/src/main/java/com/vaadin/data/SelectionModel.java b/server/src/main/java/com/vaadin/data/SelectionModel.java index 397e2a1557..417d5becf8 100644 --- a/server/src/main/java/com/vaadin/data/SelectionModel.java +++ b/server/src/main/java/com/vaadin/data/SelectionModel.java @@ -204,7 +204,7 @@ public interface SelectionModel extends Serializable { * If all the added items were already selected and the removed items * were not selected, this is a NO-OP. *

- * Duplicate items (in both add & remove sets) are ignored. + * Duplicate items (in both add & remove sets) are ignored. * * @param addedItems * the items to add, not {@code null} diff --git a/server/src/main/java/com/vaadin/data/Validator.java b/server/src/main/java/com/vaadin/data/Validator.java index 6dca15a8ed..30d6976bde 100644 --- a/server/src/main/java/com/vaadin/data/Validator.java +++ b/server/src/main/java/com/vaadin/data/Validator.java @@ -31,8 +31,8 @@ import com.vaadin.server.SerializablePredicate; * For instance, the following validator checks if a number is positive: * *

- * Validator<Integer> v = num -> {
- *     if (num >= 0)
+ * Validator<Integer> v = num -> {
+ *     if (num >= 0)
  *         return ValidationResult.ok();
  *     else
  *         return ValidationResult.error("number must be positive");
@@ -87,7 +87,7 @@ public interface Validator
      * 10, inclusive:
      *
      * 
-     * Validator<Integer> v = Validator.from(num -> num >= 0 && num <= 10,
+     * Validator<Integer> v = Validator.from(num -> num >= 0 && num <= 10,
      *         "number must be between 0 and 10");
      * 
* diff --git a/server/src/main/java/com/vaadin/event/ShortcutAction.java b/server/src/main/java/com/vaadin/event/ShortcutAction.java index 02bac50856..e7e5d7cf7b 100644 --- a/server/src/main/java/com/vaadin/event/ShortcutAction.java +++ b/server/src/main/java/com/vaadin/event/ShortcutAction.java @@ -141,15 +141,15 @@ public class ShortcutAction extends Action { * Insert one or more modifier characters before the character to use as * keycode. E.g "&Save" will make a shortcut responding to * ALT-S, "E^xit" will respond to CTRL-X.
- * Multiple modifiers can be used, e.g "&^Delete" will respond + * Multiple modifiers can be used, e.g "&^Delete" will respond * to CTRL-ALT-D (the order of the modifier characters is not important). *

*

* The modifier characters will be removed from the caption. The modifier * character is be escaped by itself: two consecutive characters are turned * into the original character w/o the special meaning. E.g - * "Save&&&close" will respond to ALT-C, and the caption will - * say "Save&close". + * "Save&&&close" will respond to ALT-C, and the caption will + * say "Save&close". *

* * @param shorthandCaption @@ -168,7 +168,7 @@ public class ShortcutAction extends Action { * caption. I.e use any of the modifier characters in the caption to * indicate the keycode, but the modifier will be the given set.
* E.g - * new ShortcutAction("Do &stuff", new int[]{ShortcutAction.ModifierKey.CTRL})); + * new ShortcutAction("Do &stuff", new int[]{ShortcutAction.ModifierKey.CTRL})); * will respond to CTRL-S. *

* diff --git a/server/src/main/java/com/vaadin/server/ClientConnector.java b/server/src/main/java/com/vaadin/server/ClientConnector.java index 9b2df069ba..d48493b917 100644 --- a/server/src/main/java/com/vaadin/server/ClientConnector.java +++ b/server/src/main/java/com/vaadin/server/ClientConnector.java @@ -223,7 +223,7 @@ public interface ClientConnector extends Connector { * Notifies the connector that it is connected to a VaadinSession (and * therefore also to a UI). *

- * The caller of this method is {@link #setParent(ClientConnector)} if the + * The caller of this method is {@link Connector#setParent(ClientConnector)} if the * parent is itself already attached to the session. If not, the parent will * call the {@link #attach()} for all its children when it is attached to * the session. This method is always called before the connector's data is diff --git a/server/src/main/java/com/vaadin/ui/Component.java b/server/src/main/java/com/vaadin/ui/Component.java index c690e945cb..28cb7be95e 100644 --- a/server/src/main/java/com/vaadin/ui/Component.java +++ b/server/src/main/java/com/vaadin/ui/Component.java @@ -616,17 +616,17 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * Example * * - * <b> + * <b> * bold * bold text * * - * <i> + * <i> * italic * italic text * * - * <u> + * <u> * underlined * underlined text * @@ -636,10 +636,10 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * N/A * * - * <ul>
- * <li>item1
- * <li>item1
- * </ul> + * <ul>
+ * <li>item1
+ * <li>item1
+ * </ul> * item list * *

    diff --git a/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java b/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java index 40d884d3e0..eaf8729a5e 100644 --- a/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java +++ b/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java @@ -243,7 +243,7 @@ public class SharedUtil implements Serializable { * @param uri * The uri to which the parameters should be added. * @param extraParams - * One or more parameters in the format "a=b" or "c=d&e=f". An + * One or more parameters in the format "a=b" or "c=d&e=f". An * empty string is allowed but will not modify the url. * @return The modified URI with the get parameters in extraParams added. */ -- 2.39.5