]> source.dussan.org Git - vaadin-framework.git/commitdiff
Update to JSoup 1.11.2 (#10353)
authorLeif Åstrand <legioth@gmail.com>
Thu, 23 Nov 2017 05:54:53 +0000 (07:54 +0200)
committerAleksi Hietanen <aleksi@vaadin.com>
Thu, 23 Nov 2017 05:54:53 +0000 (07:54 +0200)
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.

compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java
pom.xml
server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java
server/src/main/java/com/vaadin/ui/AbstractSingleSelect.java
server/src/main/java/com/vaadin/ui/CheckBoxGroup.java
server/src/main/java/com/vaadin/ui/ComboBox.java
server/src/main/java/com/vaadin/ui/Grid.java
server/src/main/java/com/vaadin/ui/RadioButtonGroup.java
server/src/main/java/com/vaadin/ui/Tree.java
server/src/main/java/com/vaadin/ui/TreeGrid.java

index be2258369793404ffd38fb5d22b317074e5541c3..fb6b368d5e25d57a9f5f8b2be1650aa012a04af2 100644 (file)
@@ -158,7 +158,7 @@ public class AbstractSelectDeclarativeTest
     private String getDesignForInlineData() {
         return "<vaadin7-list-select>\n"
                 + "        <option icon='http://some.url/icon.png'>Value 1</option>\n" //
-                + "        <option selected>Value 2</option>\n"//
+                + "        <option selected=''>Value 2</option>\n"//
                 + "</vaadin7-list-select>";
     }
 
index 455ffdd782be3973d86016bfdcbd2000a59efcbe..aed67d9c5bec26ebca826e6498142ee65b015794 100644 (file)
@@ -70,7 +70,7 @@ public class OptionGroupDeclarativeTest
                 "<vaadin7-option-group>"
                 + "<option>foo</option>"
                 + "<option>bar</option>"
-                + "<option disabled>baz</option>"
+                + "<option disabled=''>baz</option>"
                 + "<option>bang</option>"
                 + "</vaadin7-option-group>";
         //@formatter:on
diff --git a/pom.xml b/pom.xml
index fa58d125ec737c5efae29f99cb636caeb8771caa..43047fa10a36d4aa5b5a32758bbd145199cf5242 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 
         <!-- Used in OSGi manifests -->
         <javax.validation.version>1.0.0.GA</javax.validation.version>
-        <jsoup.version>1.8.3</jsoup.version>
+        <jsoup.version>1.11.2</jsoup.version>
         <javax.portlet.version>2.0</javax.portlet.version>
         <vaadin.sass.version>0.9.13</vaadin.sass.version>
         <!-- Note that this should be kept in sync with the class Constants -->
index 93b0b35403469e1f32e7b86ef05c4c925a23cd2a..fdc4f5d4a14386f1f68b09d16e3dc0d13d36bd1b 100644 (file)
@@ -426,7 +426,7 @@ public abstract class AbstractMultiSelect<T> extends AbstractListing<T>
         Element element = super.writeItem(design, item, context);
 
         if (isSelected(item)) {
-            element.attr("selected", "");
+            element.attr("selected", true);
         }
 
         return element;
index f9eed7fef3478ba94896781469ab80900c2e8fb8..a1ff9cad6903067e68a7ed197b14311054bc6320 100644 (file)
@@ -317,7 +317,7 @@ public abstract class AbstractSingleSelect<T> extends AbstractListing<T>
         Element element = super.writeItem(design, item, context);
 
         if (isSelected(item)) {
-            element.attr("selected", "");
+            element.attr("selected", true);
         }
 
         return element;
index 991f49108462fcee14e09c6faf592436ad9d2411..d658e3db2949acc7e0cf83943107d3486ed3ed6c 100644 (file)
@@ -236,7 +236,7 @@ public class CheckBoxGroup<T> extends AbstractMultiSelect<T>
         Element elem = super.writeItem(design, item, context);
 
         if (!getItemEnabledProvider().test(item)) {
-            elem.attr("disabled", "");
+            elem.attr("disabled", true);
         }
 
         if (isHtmlContentAllowed()) {
index 9fa93b66ac7c53ee13fe54c96d606d9349a9c950..6c6c55e4fc00e30655a1f7ce66bc42219d8ab058 100644 (file)
@@ -747,7 +747,7 @@ public class ComboBox<T> extends AbstractSingleSelect<T>
         }
 
         if (isSelected(item)) {
-            element.attr("selected", "");
+            element.attr("selected", true);
         }
 
         return element;
index e39c0f809f42610db79d6a8d974ea8ecc5867c4a..3e75e637d4c3faea9758d96d499c441bd1a83ab7 100644 (file)
@@ -4539,7 +4539,7 @@ public class Grid<T> extends AbstractListing<T> 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<T, ?> column : getColumns()) {
             Object value = column.valueProvider.apply(item);
index 4eebf13f504c1a04cf94c34e46744f2650441c1c..25bc959b1e3a4f21f03bad7de97d960042bf4905 100644 (file)
@@ -300,7 +300,7 @@ public class RadioButtonGroup<T> extends AbstractSingleSelect<T>
         Element elem = super.writeItem(design, item, context);
 
         if (!getItemEnabledProvider().test(item)) {
-            elem.attr("disabled", "");
+            elem.attr("disabled", true);
         }
 
         if (isHtmlContentAllowed()) {
index 5e642caacc96f67bbd679d62f6fce3d011d21edc..4e96f4a3e4a1303f179d854aa6aa2ceba7134173 100644 (file)
@@ -252,6 +252,7 @@ public class Tree<T> extends Composite
 
     /**
      * Create inner {@link TreeGrid} object. May be overridden in subclasses.
+     *
      * @return new {@link TreeGrid}
      */
     protected TreeGrid<T> createTreeGrid() {
@@ -971,7 +972,7 @@ public class Tree<T> extends Composite
         }
 
         if (getSelectionModel().isSelected(item)) {
-            itemElement.attr("selected", "");
+            itemElement.attr("selected", true);
         }
 
         Resource icon = getItemIconGenerator().apply(item);
index ba570a2160f40e02730f56ce53b43bed11105f6c..65329d24c83a0b0f271ad9a9c7781baa83d8ddfe 100644 (file)
@@ -474,7 +474,7 @@ public class TreeGrid<T> extends Grid<T>
             tableRow.attr("parent", serializeDeclarativeRepresentation(parent));
         }
         if (getSelectionModel().isSelected(item)) {
-            tableRow.attr("selected", "");
+            tableRow.attr("selected", true);
         }
         for (Column<T, ?> column : getColumns()) {
             Object value = column.getValueProvider().apply(item);