]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed NPE (warning message): for variable change requests which relate to non-existen...
authorJani Laakso <jani.laakso@itmill.com>
Mon, 10 Mar 2008 08:48:55 +0000 (08:48 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Mon, 10 Mar 2008 08:48:55 +0000 (08:48 +0000)
svn changeset:4009/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java

index 70e85f0e280f66a5c7609b3aba72c08caa2174d3..ed7461c7d6ba174707b2a4afeca40f8830ab7f29 100644 (file)
@@ -516,16 +516,17 @@ public class CommunicationManager implements Paintable.RepaintRequestListener {
                 } else {
                     // Ignore variable change
                     String msg = "Warning: Ignoring variable change for ";
+                    String caption = null;
                     if (owner != null) {
                         msg += "disabled component " + owner.getClass();
+                        caption = ((Component) owner).getCaption();
+                        if (caption != null) {
+                            msg += ", caption=" + caption;
+                        }
                     } else {
                         msg += "non-existent component, VAR_PID="
                                 + variable[VAR_PID];
                     }
-                    String caption = ((Component) owner).getCaption();
-                    if (caption != null) {
-                        msg += ", caption=" + caption;
-                    }
                     System.err.println(msg);
                     continue;
                 }