You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2018/04/04 14:24:12 UTC

[myfaces-tobago] branch master updated (ef8e0bb -> 4f7ea48)

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git.


    from ef8e0bb  rebuild themes after update
     new 0da1046  TOBAGO-1887: Content sometimes "jumps" on AJAX update (e.g. tc:tree)
     new 53dbbe5  Merge remote-tracking branch 'origin/master'
     new 4f7ea48  Resolves same issue as MYFACES-4199 * NPE inside empty <f:selectItem>

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../renderkit/renderer/SelectManyRendererBase.java |  4 +-
 .../tobago/internal/util/SelectItemUtils.java      |  2 +-
 .../internal/webapp/TobagoResponseWriterBase.java  | 47 ++++++++++-----------
 .../080-sheet/10-sort/sheet-sorting.test.js        | 48 +++++++++++-----------
 .../tobago-bootstrap/_version/js/tobago-jsf.js     | 15 ++++---
 5 files changed, 59 insertions(+), 57 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.

[myfaces-tobago] 02/03: Merge remote-tracking branch 'origin/master'

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 53dbbe53a8bed294d2caf05000683629925a91cc
Merge: 0da1046 ef8e0bb
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Apr 4 15:50:10 2018 +0200

    Merge remote-tracking branch 'origin/master'

 .../myfaces/tobago/component/RendererTypes.java    |  4 ++
 .../internal/component/AbstractUISection.java      | 15 -----
 .../internal/renderkit/renderer/BoxRenderer.java   | 24 +++++---
 .../internal/renderkit/renderer/InRenderer.java    | 11 +---
 .../renderer/OutInsideBoxLabelRenderer.java        | 45 ++++++++++++++
 .../renderer/OutInsideSectionLabelRenderer.java    | 45 ++++++++++++++
 .../renderkit/renderer/SectionRenderer.java        | 17 +++++-
 .../renderkit/renderer/TabGroupRenderer.java       | 12 ++--
 .../taglib/component/OutTagDeclaration.java        |  3 +-
 .../myfaces/tobago/internal/util/RenderUtils.java  | 10 ++++
 tobago-core/src/main/resources/scss/_tobago.scss   |  7 +++
 .../myfaces/tobago/example/demo/BoxController.java | 56 ++++++++++++++++++
 .../20-component/050-container/10-box/box.xhtml    | 57 ++++++++++++++++++
 .../content/20-component/070-tab/tab.test.js       | 18 +++++-
 .../webapp/content/20-component/070-tab/tab.xhtml  | 24 ++++----
 .../080-sheet/10-sort/sheet-sorting.test.js        | 48 +++++++--------
 .../40000-style/100-headings/headings.test.js      | 68 ++++++++++++++++++++++
 .../40000-style/100-headings/headings.xhtml        | 53 +++++++++++++++++
 .../webapp/content/40-test/40000-style/style.xhtml | 23 ++++++++
 .../tobago-theme-charlotteville/rebuild-theme.txt  | 47 ++++++++-------
 .../tobago-bootstrap/_version/css/bootstrap.css    |  4 ++
 .../_version/css/bootstrap.css.map                 |  2 +-
 .../_version/css/bootstrap.min.css                 |  2 +-
 .../_version/css/bootstrap.min.css.map             |  2 +-
 .../tobago-theme-roxborough/rebuild-theme.txt      | 43 +++++++-------
 .../tobago-bootstrap/_version/css/bootstrap.css    |  4 ++
 .../_version/css/bootstrap.css.map                 |  2 +-
 .../_version/css/bootstrap.min.css                 |  2 +-
 .../_version/css/bootstrap.min.css.map             |  2 +-
 .../tobago-theme-scarborough/rebuild-theme.txt     | 45 +++++++-------
 .../tobago-bootstrap/_version/css/bootstrap.css    |  4 ++
 .../_version/css/bootstrap.css.map                 |  2 +-
 .../_version/css/bootstrap.min.css                 |  2 +-
 .../_version/css/bootstrap.min.css.map             |  2 +-
 .../tobago-theme-speyside/rebuild-theme.txt        | 43 +++++++-------
 .../tobago-bootstrap/_version/css/bootstrap.css    |  4 ++
 .../_version/css/bootstrap.css.map                 |  2 +-
 .../_version/css/bootstrap.min.css                 |  2 +-
 .../_version/css/bootstrap.min.css.map             |  2 +-
 .../tobago-theme-standard/rebuild-theme.txt        | 48 +++++++--------
 .../tobago-bootstrap/_version/css/bootstrap.css    |  4 ++
 .../_version/css/bootstrap.css.map                 |  2 +-
 .../_version/css/bootstrap.min.css                 |  2 +-
 .../_version/css/bootstrap.min.css.map             |  2 +-
 44 files changed, 604 insertions(+), 212 deletions(-)

diff --cc tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.test.js
index a12f531,a12f531..8265e0a
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.test.js
@@@ -1258,18 -1258,18 +1258,18 @@@ QUnit.test("Custom Sorting: right pagin
  
  function ajaxWaitingBodyTableCheck($rows, row0col0, row0col1, row0col2, row1col0, row1col1, row1col2,
                                     row2col0, row2col1, row2col2, row3col0, row3col1, row3col2) {
--  var $row0Col0 = $rows.eq(0).find(".tobago-sheet-cell").eq(0).text();
--  var $row0Col1 = $rows.eq(0).find(".tobago-sheet-cell").eq(1).text();
--  var $row0Col2 = $rows.eq(0).find(".tobago-sheet-cell").eq(2).text();
--  var $row1Col0 = $rows.eq(1).find(".tobago-sheet-cell").eq(0).text();
--  var $row1Col1 = $rows.eq(1).find(".tobago-sheet-cell").eq(1).text();
--  var $row1Col2 = $rows.eq(1).find(".tobago-sheet-cell").eq(2).text();
--  var $row2Col0 = $rows.eq(2).find(".tobago-sheet-cell").eq(0).text();
--  var $row2Col1 = $rows.eq(2).find(".tobago-sheet-cell").eq(1).text();
--  var $row2Col2 = $rows.eq(2).find(".tobago-sheet-cell").eq(2).text();
--  var $row3Col0 = $rows.eq(3).find(".tobago-sheet-cell").eq(0).text();
--  var $row3Col1 = $rows.eq(3).find(".tobago-sheet-cell").eq(1).text();
--  var $row3Col2 = $rows.eq(3).find(".tobago-sheet-cell").eq(2).text();
++  var $row0Col0 = $rows.eq(0).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row0Col1 = $rows.eq(0).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row0Col2 = $rows.eq(0).find(".tobago-sheet-cell").eq(2).text().trim();
++  var $row1Col0 = $rows.eq(1).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row1Col1 = $rows.eq(1).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row1Col2 = $rows.eq(1).find(".tobago-sheet-cell").eq(2).text().trim();
++  var $row2Col0 = $rows.eq(2).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row2Col1 = $rows.eq(2).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row2Col2 = $rows.eq(2).find(".tobago-sheet-cell").eq(2).text().trim();
++  var $row3Col0 = $rows.eq(3).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row3Col1 = $rows.eq(3).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row3Col2 = $rows.eq(3).find(".tobago-sheet-cell").eq(2).text().trim();
  
    return $row0Col0 === row0col0 && $row0Col1 === row0col1 && $row0Col2 === row0col2
        && $row1Col0 === row1col0 && $row1Col1 === row1col1 && $row1Col2 === row1col2
@@@ -1279,18 -1279,18 +1279,18 @@@
  
  function ajaxExecuteBodyTableCheck(assert, $rows, row0col0, row0col1, row0col2, row1col0, row1col1, row1col2,
                                     row2col0, row2col1, row2col2, row3col0, row3col1, row3col2) {
--  var $row0Col0 = $rows.eq(0).find(".tobago-sheet-cell").eq(0).text();
--  var $row0Col1 = $rows.eq(0).find(".tobago-sheet-cell").eq(1).text();
--  var $row0Col2 = $rows.eq(0).find(".tobago-sheet-cell").eq(2).text();
--  var $row1Col0 = $rows.eq(1).find(".tobago-sheet-cell").eq(0).text();
--  var $row1Col1 = $rows.eq(1).find(".tobago-sheet-cell").eq(1).text();
--  var $row1Col2 = $rows.eq(1).find(".tobago-sheet-cell").eq(2).text();
--  var $row2Col0 = $rows.eq(2).find(".tobago-sheet-cell").eq(0).text();
--  var $row2Col1 = $rows.eq(2).find(".tobago-sheet-cell").eq(1).text();
--  var $row2Col2 = $rows.eq(2).find(".tobago-sheet-cell").eq(2).text();
--  var $row3Col0 = $rows.eq(3).find(".tobago-sheet-cell").eq(0).text();
--  var $row3Col1 = $rows.eq(3).find(".tobago-sheet-cell").eq(1).text();
--  var $row3Col2 = $rows.eq(3).find(".tobago-sheet-cell").eq(2).text();
++  var $row0Col0 = $rows.eq(0).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row0Col1 = $rows.eq(0).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row0Col2 = $rows.eq(0).find(".tobago-sheet-cell").eq(2).text().trim();
++  var $row1Col0 = $rows.eq(1).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row1Col1 = $rows.eq(1).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row1Col2 = $rows.eq(1).find(".tobago-sheet-cell").eq(2).text().trim();
++  var $row2Col0 = $rows.eq(2).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row2Col1 = $rows.eq(2).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row2Col2 = $rows.eq(2).find(".tobago-sheet-cell").eq(2).text().trim();
++  var $row3Col0 = $rows.eq(3).find(".tobago-sheet-cell").eq(0).text().trim();
++  var $row3Col1 = $rows.eq(3).find(".tobago-sheet-cell").eq(1).text().trim();
++  var $row3Col2 = $rows.eq(3).find(".tobago-sheet-cell").eq(2).text().trim();
  
    assert.equal($row0Col0, row0col0, "row0col0");
    assert.equal($row0Col1, row0col1, "row0col1");

-- 
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.

[myfaces-tobago] 01/03: TOBAGO-1887: Content sometimes "jumps" on AJAX update (e.g. tc:tree)

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 0da1046c8caf13fdb1edb21319a5ab9a168cf321
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Apr 4 14:49:20 2018 +0200

    TOBAGO-1887: Content sometimes "jumps" on AJAX update (e.g. tc:tree)
---
 .../internal/webapp/TobagoResponseWriterBase.java  | 47 +++++++++++-----------
 .../tobago-bootstrap/_version/js/tobago-jsf.js     | 15 ++++---
 2 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterBase.java
index 2c3d758..f94fd34 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterBase.java
@@ -19,7 +19,6 @@
 
 package org.apache.myfaces.tobago.internal.webapp;
 
-import org.apache.myfaces.tobago.internal.util.StringUtils;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.HtmlTypes;
 import org.apache.myfaces.tobago.renderkit.html.MarkupLanguageAttributes;
@@ -28,7 +27,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
 import java.io.IOException;
 import java.io.Writer;
 import java.net.URI;
@@ -41,7 +39,7 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
 
   protected static final char[] XML_VERSION_1_0_ENCODING_UTF_8_CHARS = XML_VERSION_1_0_ENCODING_UTF_8.toCharArray();
 
-  private int i = 0;
+  private int level = 0;
 
   private int inlineStack = 0;
 
@@ -55,13 +53,10 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
 
   private final String characterEncoding;
 
-  private final boolean ajax;
-
   protected TobagoResponseWriterBase(final Writer writer, final String contentType, final String characterEncoding) {
     this.writer = writer;
     this.contentType = contentType;
     this.characterEncoding = characterEncoding != null ? characterEncoding : "UTF-8";
-    this.ajax = FacesContext.getCurrentInstance().getPartialViewContext().isPartialRequest();
   }
 
   protected final Writer getWriter() {
@@ -164,7 +159,7 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
 
   protected void closeOpenTag() throws IOException {
     if (startStillOpen) {
-      writer.write(">");
+      writer.write('>');
       startStillOpen = false;
     }
   }
@@ -207,21 +202,22 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
     }
     startElementInternal(writer, name.getValue(), name.isInline());
     if (!name.isVoid()) {
-      i++;
+      level++;
     }
   }
 
   protected void startElementInternal(final Writer sink, final String name, final boolean inline)
       throws IOException {
-//    closeOpenTag();
     if (startStillOpen) {
-      sink.write(">");
+      sink.write('>');
     }
-    if (!ajax && inlineStack <= 1) {
-      sink.write("\n");
-      sink.write(StringUtils.repeat("  ", i));
+    if (inlineStack <= 1) {
+      sink.write('\n');
+      for (int i = 0; i < level; i++) {
+        sink.write(' ');
+      }
     }
-    sink.write("<");
+    sink.write('<');
     sink.write(name);
     startStillOpen = true;
   }
@@ -248,7 +244,7 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
       closeEmptyTag();
     } else {
       if (!name.isVoid()) {
-        i--;
+        level--;
       }
       endElementInternal(writer, name.getValue(), inline);
     }
@@ -263,9 +259,9 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
   public void writeComment(final Object obj) throws IOException {
     closeOpenTag();
     final String comment = obj.toString();
-    if (!ajax) {
-      writer.write("\n");
-      writer.write(StringUtils.repeat("  ", i));
+    writer.write('\n');
+    for (int i = 0; i < level; i++) {
+      writer.write(' ');
     }
     write("<!--");
     write(comment);
@@ -284,7 +280,7 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
     writeAttribute(new MarkupLanguageAttributes() {
       @Override
       public String getValue() {
-          return name;
+        return name;
       }
     }, attribute, true);
   }
@@ -331,15 +327,19 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
 
   protected void endElementInternal(final Writer sink, final String name, final boolean inline) throws IOException {
     if (startStillOpen) {
-      sink.write(">");
+      sink.write('>');
     }
-    if (inline || ajax) {
+    if (inline) {
       sink.write("</");
     } else {
-      sink.write("\n" + StringUtils.repeat("  ", i) + "</");
+      sink.write('\n');
+      for (int i = 0; i < level; i++) {
+        sink.write(' ');
+      }
+      sink.write("</");
     }
     sink.write(name);
-    sink.write(">");
+    sink.write('>');
   }
 
   protected abstract void closeEmptyTag() throws IOException;
@@ -365,6 +365,7 @@ public abstract class TobagoResponseWriterBase extends TobagoResponseWriter {
       sink.write('\'');
     }
   }
+
   protected abstract void writerAttributeValue(String value, boolean escape) throws IOException;
 
 
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-jsf.js b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-jsf.js
index 7f0cbb7..1e6d095 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-jsf.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-jsf.js
@@ -15,7 +15,7 @@
  */
 
 /*
- * XXX This is a modified copy of MyFaces 2.2.10 jsf-uncompressed-full.js
+ * XXX This is a modified copy of MyFaces 2.2.13-SNAPSHOT (2018-04-04) jsf-uncompressed-full.js
  * XXX Modifications are marked with TOBAGO-JSF-JS
  */
 
@@ -3450,10 +3450,10 @@ _MF_CLS(_PFX_UTIL+"_ListenerQueue", myfaces._impl._util._Queue,
 
     /**
      * generic broadcast with a number of arguments being passed down
-     * @param {Object} argument the arguments passed down which are broadcast
+     * @param {Object} args the arguments passed down which are broadcast
      */
-    broadcastEvent : function(argument) {
-        var _args = myfaces._impl._util._Lang.objToArray(arguments);
+    broadcastEvent : function(args) {
+        var _args = myfaces._impl._util._Lang.objToArray(arguments); // XXX arguments vs. args?
 
         var broadCastFunc = function(element) {
             element.apply(null, _args);
@@ -6405,7 +6405,6 @@ _MF_CLS(_PFX_XHR + "engine.IFrame", myfaces._impl.xhrCore.engine.BaseRequest,
              *
              * @param args
              */
-            /* TOBAGO-JSF-JS: rename "arguments" with "args", because the compressor would fail */
             constructor_: function (args) {
                 //we fetch in the standard arguments
 
@@ -7064,7 +7063,6 @@ _MF_CLS(_PFX_XHR + "_MultipartAjaxRequestLevel2", myfaces._impl.xhrCore._AjaxReq
 
     _sourceForm:null,
 
-    /* TOBAGO-JSF-JS: rename "arguments" with "args", because the compressor would fail */
     constructor_:function (args) {
         this._callSuper("constructor_", args);
         //TODO xhr level2 can deal with real props
@@ -7114,7 +7112,6 @@ _MF_CLS(_PFX_XHR + "_AjaxRequestLevel2", myfaces._impl.xhrCore._AjaxRequest, {
 
     _sourceForm:null,
 
-    /* TOBAGO-JSF-JS: rename "arguments" with "args", because the compressor would fail */
     constructor_:function (args) {
         this._callSuper("constructor_", args);
         //TODO xhr level2 can deal with real props
@@ -7173,7 +7170,6 @@ _MF_CLS(_PFX_XHR+"_IFrameRequest", myfaces._impl.xhrCore._AjaxRequest,
     MF_PART_FACES_REQUEST: "javax.faces.request",
 
 
-    /* TOBAGO-JSF-JS: rename "arguments" with "args", because the compressor would fail */
     constructor_: function(args) {
         this._callSuper("constructor_", args);
     },
@@ -7570,6 +7566,9 @@ _MF_SINGLTN(_PFX_XHR + "_AjaxResponse", _MF_OBJECT, /** @lends myfaces._impl.xhr
                     break;
                 case this.CMD_EXTENSION:
                     break;
+                case undefined:
+                    // ignoring white spaces
+                    break;
                 default:
                     throw this._raiseError(new Error(), "_AjaxResponse.processChanges: Illegal Command Issued", "processChanges");
             }

-- 
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.

[myfaces-tobago] 03/03: Resolves same issue as MYFACES-4199 * NPE inside empty

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 4f7ea483cbbb4c1df8a56e9e40cd2d9da852c389
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Apr 4 16:21:38 2018 +0200

    Resolves same issue as MYFACES-4199
    * NPE inside empty <f:selectItem>
---
 .../tobago/internal/renderkit/renderer/SelectManyRendererBase.java    | 4 +++-
 .../java/org/apache/myfaces/tobago/internal/util/SelectItemUtils.java | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyRendererBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyRendererBase.java
index ad424e1..7f99f49 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyRendererBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyRendererBase.java
@@ -675,7 +675,9 @@ public abstract class SelectManyRendererBase extends MessageLayoutRendererBase {
           // must be called on the string rendered attribute values
           Object itemLabel = attributeMap.get(ITEM_LABEL_ATTR);
           if (itemLabel == null) {
-            itemLabel = itemValue.toString();
+            if (itemValue != null) {
+              itemLabel = itemValue.toString();
+            }
           } else {
             itemLabel = itemLabel.toString();
           }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/SelectItemUtils.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/SelectItemUtils.java
index 71ddbcc..74a1b5e 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/SelectItemUtils.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/SelectItemUtils.java
@@ -139,7 +139,7 @@ public class SelectItemUtils {
           final boolean disabled = uiSelectItem.isItemDisabled();
 //          boolean escape = uiSelectItem.isItemEscaped();
 //          boolean noSelectionOption = uiSelectItem.isNoSelectionOption();
-          if (label == null) {
+          if (label == null && itemValue != null) {
             label = itemValue.toString();
           }
           String image = null;

-- 
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.