ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1521502 - /ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
Date Tue, 10 Sep 2013 14:24:27 GMT
Author: marrs
Date: Tue Sep 10 14:24:27 2013
New Revision: 1521502

URL: http://svn.apache.org/r1521502
Log:
Added a couple of null checks to prevent a NPE that occasionally occurred.

Modified:
    ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java

Modified: ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java?rev=1521502&r1=1521501&r2=1521502&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
(original)
+++ ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
Tue Sep 10 14:24:27 2013
@@ -549,9 +549,14 @@ abstract class BaseObjectPanel<REPO_OBJ 
      * @param object the repository object to update, cannot be <code>null</code>.
      */
     protected void update(REPO_OBJ object) {
-        Item item = getItem(object.getDefinition());
-        if (item != null) {
-            populateItem(object, item);
+        if (object != null) {
+            String definition = object.getDefinition();
+            if (definition != null) {
+                Item item = getItem(definition);
+                if (item != null) {
+                    populateItem(object, item);
+                }
+            }
         }
     }
 



Mime
View raw message