From 2fc7554779cb3df2e58dab9057a9b51839e84930 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 23 Nov 2017 07:54:53 +0200 Subject: [PATCH] Update to JSoup 1.11.2 (#10353) Also update declarative writing to use true instead of "" for empty attributes because of changed defaults in JSoup. For v7, the tests are updated instead of touching the implementations. --- .../abstractselect/AbstractSelectDeclarativeTest.java | 2 +- .../component/abstractselect/OptionGroupDeclarativeTest.java | 2 +- pom.xml | 2 +- server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java | 2 +- server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java | 2 +- server/src/main/java/com/vaadin/ui/CheckBoxGroup.java | 2 +- server/src/main/java/com/vaadin/ui/ComboBox.java | 2 +- server/src/main/java/com/vaadin/ui/Grid.java | 2 +- server/src/main/java/com/vaadin/ui/RadioButtonGroup.java | 2 +- server/src/main/java/com/vaadin/ui/Tree.java | 3 ++- server/src/main/java/com/vaadin/ui/TreeGrid.java | 2 +- 11 files changed, 12 insertions(+), 11 deletions(-) diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java index be22583697..fb6b368d5e 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java @@ -158,7 +158,7 @@ public class AbstractSelectDeclarativeTest private String getDesignForInlineData() { return "\n" + " \n" // - + " \n"// + + " \n"// + ""; } diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java index 455ffdd782..aed67d9c5b 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java @@ -70,7 +70,7 @@ public class OptionGroupDeclarativeTest "" + "" + "" - + "" + + "" + "" + ""; //@formatter:on diff --git a/pom.xml b/pom.xml index fa58d125ec..43047fa10a 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 1.0.0.GA - 1.8.3 + 1.11.2 2.0 0.9.13 diff --git a/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java b/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java index 93b0b35403..fdc4f5d4a1 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java +++ b/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java @@ -426,7 +426,7 @@ public abstract class AbstractMultiSelect extends AbstractListing Element element = super.writeItem(design, item, context); if (isSelected(item)) { - element.attr("selected", ""); + element.attr("selected", true); } return element; diff --git a/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java b/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java index f9eed7fef3..a1ff9cad69 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java +++ b/server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java @@ -317,7 +317,7 @@ public abstract class AbstractSingleSelect extends AbstractListing Element element = super.writeItem(design, item, context); if (isSelected(item)) { - element.attr("selected", ""); + element.attr("selected", true); } return element; diff --git a/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java b/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java index 991f491084..d658e3db29 100644 --- a/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java +++ b/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java @@ -236,7 +236,7 @@ public class CheckBoxGroup extends AbstractMultiSelect Element elem = super.writeItem(design, item, context); if (!getItemEnabledProvider().test(item)) { - elem.attr("disabled", ""); + elem.attr("disabled", true); } if (isHtmlContentAllowed()) { diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java index 9fa93b66ac..6c6c55e4fc 100644 --- a/server/src/main/java/com/vaadin/ui/ComboBox.java +++ b/server/src/main/java/com/vaadin/ui/ComboBox.java @@ -747,7 +747,7 @@ public class ComboBox extends AbstractSingleSelect } if (isSelected(item)) { - element.attr("selected", ""); + element.attr("selected", true); } return element; diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index e39c0f809f..3e75e637d4 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -4539,7 +4539,7 @@ public class Grid extends AbstractListing implements HasComponents, Element tableRow = container.appendElement("tr"); tableRow.attr("item", serializeDeclarativeRepresentation(item)); if (getSelectionModel().isSelected(item)) { - tableRow.attr("selected", ""); + tableRow.attr("selected", true); } for (Column column : getColumns()) { Object value = column.valueProvider.apply(item); diff --git a/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java b/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java index 4eebf13f50..25bc959b1e 100644 --- a/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java +++ b/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java @@ -300,7 +300,7 @@ public class RadioButtonGroup extends AbstractSingleSelect Element elem = super.writeItem(design, item, context); if (!getItemEnabledProvider().test(item)) { - elem.attr("disabled", ""); + elem.attr("disabled", true); } if (isHtmlContentAllowed()) { diff --git a/server/src/main/java/com/vaadin/ui/Tree.java b/server/src/main/java/com/vaadin/ui/Tree.java index 5e642caacc..4e96f4a3e4 100644 --- a/server/src/main/java/com/vaadin/ui/Tree.java +++ b/server/src/main/java/com/vaadin/ui/Tree.java @@ -252,6 +252,7 @@ public class Tree extends Composite /** * Create inner {@link TreeGrid} object. May be overridden in subclasses. + * * @return new {@link TreeGrid} */ protected TreeGrid createTreeGrid() { @@ -971,7 +972,7 @@ public class Tree extends Composite } if (getSelectionModel().isSelected(item)) { - itemElement.attr("selected", ""); + itemElement.attr("selected", true); } Resource icon = getItemIconGenerator().apply(item); diff --git a/server/src/main/java/com/vaadin/ui/TreeGrid.java b/server/src/main/java/com/vaadin/ui/TreeGrid.java index ba570a2160..65329d24c8 100644 --- a/server/src/main/java/com/vaadin/ui/TreeGrid.java +++ b/server/src/main/java/com/vaadin/ui/TreeGrid.java @@ -474,7 +474,7 @@ public class TreeGrid extends Grid tableRow.attr("parent", serializeDeclarativeRepresentation(parent)); } if (getSelectionModel().isSelected(item)) { - tableRow.attr("selected", ""); + tableRow.attr("selected", true); } for (Column column : getColumns()) { Object value = column.getValueProvider().apply(item); -- 2.39.5