diff options
author | John Ahlroos <john@vaadin.com> | 2012-09-10 12:34:31 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-09-10 12:34:31 +0300 |
commit | 12513bd7bbe19f5574e64a7a6e0de0113c860dbc (patch) | |
tree | be06ddff1b070672a60df2622039243143412012 | |
parent | 00f75c5a162e58e04d6d6f087ccceab98dfdf1f0 (diff) | |
parent | 448d56cc85518eb55dbd3113b81a7998a4b914e1 (diff) | |
download | vaadin-framework-12513bd7bbe19f5574e64a7a6e0de0113c860dbc.tar.gz vaadin-framework-12513bd7bbe19f5574e64a7a6e0de0113c860dbc.zip |
Merge remote-tracking branch 'origin/master'
9 files changed, 8 insertions, 27 deletions
diff --git a/WebContent/WEB-INF/portlet.xml b/WebContent/WEB-INF/portlet.xml index 5faafc5c36..2f7135fea9 100644 --- a/WebContent/WEB-INF/portlet.xml +++ b/WebContent/WEB-INF/portlet.xml @@ -13,7 +13,7 @@ </init-param> <init-param> <name>widgetset</name> - <value>com.vaadin.portal.gwt.PortalDefaultWidgetSet</value> + <value>com.vaadin.DefaultWidgetSet</value> </init-param> <supports> <mime-type>text/html</mime-type> diff --git a/client/src/com/vaadin/portal/gwt/PortalDefaultWidgetSet.gwt.xml b/client/src/com/vaadin/portal/gwt/PortalDefaultWidgetSet.gwt.xml deleted file mode 100644 index c127d3bb21..0000000000 --- a/client/src/com/vaadin/portal/gwt/PortalDefaultWidgetSet.gwt.xml +++ /dev/null @@ -1,6 +0,0 @@ -<module> - <!-- WS Compiler: manually edited --> - - <!-- Inherit the DefaultWidgetSet --> - <inherits name="com.vaadin.DefaultWidgetSet" /> -</module> diff --git a/server/src/com/vaadin/server/AbstractClientConnector.java b/server/src/com/vaadin/server/AbstractClientConnector.java index 2fb468bd1c..4c22a96782 100644 --- a/server/src/com/vaadin/server/AbstractClientConnector.java +++ b/server/src/com/vaadin/server/AbstractClientConnector.java @@ -146,8 +146,6 @@ public abstract class AbstractClientConnector implements ClientConnector { } protected SharedState getState() { - assert getSession() == null - || getSession().getLock().isHeldByCurrentThread() : VaadinSession.SESSION_LOCK_MESSAGE; if (null == sharedState) { sharedState = createState(); } diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 03e6420008..a91c011ddf 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -28,6 +28,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Logger; @@ -70,8 +71,6 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { */ public static final String UI_PARAMETER = "UI"; - public static final String SESSION_LOCK_MESSAGE = "You are accessing UI state without proper synchronization!"; - private static final Method BOOTSTRAP_FRAGMENT_METHOD = ReflectTools .findMethod(BootstrapListener.class, "modifyBootstrapFragment", BootstrapFragmentResponse.class); @@ -79,7 +78,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { .findMethod(BootstrapListener.class, "modifyBootstrapPage", BootstrapPageResponse.class); - private final ReentrantLock lock = new ReentrantLock(); + private final Lock lock = new ReentrantLock(); /** * An event sent to {@link #start(SessionStartEvent)} when a new Application @@ -207,10 +206,6 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { private final Map<String, Object> attributes = new HashMap<String, Object>(); - public VaadinSession() { - // TODO Auto-generated constructor stub - } - /** * @see javax.servlet.http.HttpSessionBindingListener#valueBound(HttpSessionBindingEvent) */ @@ -1309,7 +1304,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * * @return the lock that should be used for synchronization */ - public ReentrantLock getLock() { + public Lock getLock() { return lock; } diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java index 442fa095d4..e7d6d9a4ec 100644 --- a/server/src/com/vaadin/ui/AbstractField.java +++ b/server/src/com/vaadin/ui/AbstractField.java @@ -381,7 +381,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements public String toString() { logger.warning("You are using AbstractField.toString() to get the value for a " + getClass().getSimpleName() - + ". This is not recommended and will not be supported in future versions."); + + ". This will not be supported starting from Vaadin 7.1 " + + "(your debugger might call toString() and cause this message to appear)."); final Object value = getFieldValue(); if (value == null) { return null; diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index dbada63a47..d454df98ee 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -29,7 +29,6 @@ import com.vaadin.server.AbstractClientConnector; import com.vaadin.server.AbstractCommunicationManager; import com.vaadin.server.ClientConnector; import com.vaadin.server.GlobalResourceHandler; -import com.vaadin.server.VaadinSession; /** * A class which takes care of book keeping of {@link ClientConnector}s for a @@ -287,8 +286,6 @@ public class ConnectorTracker implements Serializable { * The connector that should be marked clean. */ public void markDirty(ClientConnector connector) { - assert uI.getSession() == null - || uI.getSession().getLock().isHeldByCurrentThread() : VaadinSession.SESSION_LOCK_MESSAGE; if (isWritingResponse()) { throw new IllegalStateException( "A connector should not be marked as dirty while a response is being written."); diff --git a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java index bc5846acf0..b64514ea14 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java +++ b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java @@ -69,7 +69,6 @@ public class ConverterFactory extends TestCase { final VaadinSession appWithCustomIntegerConverter = new VaadinSession(); appWithCustomIntegerConverter .setConverterFactory(new ConverterFactory42()); - appWithCustomIntegerConverter.getLock().lock(); TextField tf = new TextField("", "123") { @Override @@ -98,7 +97,6 @@ public class ConverterFactory extends TestCase { public void testApplicationConverterFactoryForDifferentThanCurrentApplication() { final VaadinSession fieldAppWithCustomIntegerConverter = new VaadinSession(); - fieldAppWithCustomIntegerConverter.getLock().lock(); fieldAppWithCustomIntegerConverter .setConverterFactory(new ConverterFactory42()); VaadinSession.setCurrent(new VaadinSession()); diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java index 031e0c80bd..b48ad62bcc 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java @@ -187,7 +187,6 @@ public class AbstractFieldValueConversions extends TestCase { public void testNumberDoubleConverterChange() { final VaadinSession a = new VaadinSession(); - a.getLock().lock(); VaadinSession.setCurrent(a); TextField tf = new TextField() { @Override diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java index f259e156ff..c9f579a887 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java @@ -19,11 +19,10 @@ public class RemoveListenersOnDetach { AbstractField field = new AbstractField() { final private VaadinSession application = new VaadinSession() { - { - getLock().lock(); - } + }; private UI uI = new UI() { + @Override protected void init(WrappedRequest request) { |