]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix missing licenses and Serializable (#6690)
authorLeif Åstrand <leif@vaadin.com>
Wed, 30 May 2012 08:34:52 +0000 (11:34 +0300)
committerLeif Åstrand <leif@vaadin.com>
Wed, 6 Jun 2012 06:33:25 +0000 (09:33 +0300)
src/com/vaadin/terminal/AbstractClientConnector.java
src/com/vaadin/terminal/AbstractExtension.java
src/com/vaadin/terminal/Extension.java
src/com/vaadin/ui/DirtyConnectorTracker.java

index ad7c98b7e183bc197a8ad155155c5bc21b191dea..136ed702fc0fc1828e588cd1b488e393f39cf1d3 100644 (file)
@@ -1,3 +1,6 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
 package com.vaadin.terminal;
 
 import java.io.Serializable;
@@ -197,6 +200,27 @@ public abstract class AbstractClientConnector implements ClientConnector {
         }
     }
 
+    private static final class AllChildrenIterable implements
+            Iterable<ClientConnector>, Serializable {
+        private final ClientConnector connector;
+
+        private AllChildrenIterable(ClientConnector connector) {
+            this.connector = connector;
+        }
+
+        public Iterator<ClientConnector> iterator() {
+            CombinedIterator<ClientConnector> iterator = new CombinedIterator<ClientConnector>();
+            iterator.addIterator(connector.getExtensionIterator());
+
+            if (connector instanceof HasComponents) {
+                HasComponents hasComponents = (HasComponents) connector;
+                iterator.addIterator(hasComponents.iterator());
+            }
+
+            return iterator;
+        }
+    }
+
     private class RpcInvoicationHandler implements InvocationHandler,
             Serializable {
 
@@ -349,19 +373,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
 
     public static Iterable<ClientConnector> getAllChildrenIteratable(
             final ClientConnector connector) {
-        return new Iterable<ClientConnector>() {
-            public Iterator<ClientConnector> iterator() {
-                CombinedIterator<ClientConnector> iterator = new CombinedIterator<ClientConnector>();
-                iterator.addIterator(connector.getExtensionIterator());
-
-                if (connector instanceof HasComponents) {
-                    HasComponents hasComponents = (HasComponents) connector;
-                    iterator.addIterator(hasComponents.iterator());
-                }
-
-                return iterator;
-            }
-        };
+        return new AllChildrenIterable(connector);
     }
 
     public Iterator<Extension> getExtensionIterator() {
index d01f7544c53b6894f4253ba0103d8c791c393e6e..35123bc488574320a62b2d7cf5c3d601fd169fe2 100644 (file)
@@ -1,9 +1,13 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
 package com.vaadin.terminal;
 
 import com.vaadin.terminal.gwt.server.ClientConnector;
 
-public abstract class AbstractExtension extends AbstractClientConnector implements
-        Extension {
+public abstract class AbstractExtension extends AbstractClientConnector
+        implements Extension {
 
     protected Class<? extends ClientConnector> getAcceptedParentType() {
         return ClientConnector.class;
index 7e4b92811de5cff9abe9ebc63c6d494cd5b916ce..7769423f0d7361b30988c3fae92310ff43b0324b 100644 (file)
@@ -1,3 +1,7 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
 package com.vaadin.terminal;
 
 import com.vaadin.terminal.gwt.server.ClientConnector;
index a4e509422ceb4858513cf786a9b2ddfd10dca22e..dae334fe4ca25e7d04aa55bc1e628a09ae91db63 100644 (file)
@@ -3,6 +3,7 @@
  */
 package com.vaadin.ui;
 
+import java.io.Serializable;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
@@ -23,7 +24,7 @@ import com.vaadin.terminal.gwt.server.ClientConnector;
  * @since 7.0.0
  * 
  */
-public class DirtyConnectorTracker {
+public class DirtyConnectorTracker implements Serializable {
     private Set<ClientConnector> dirtyConnectors = new HashSet<ClientConnector>();
     private Root root;