From a6c725ca0490b8d42c3468bd9a49ef49571cb59f Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Thu, 3 Apr 2014 15:05:10 +0300 Subject: Deprecate AbstractTestUI.setContent You might accidentally write a test inheriting from AbstractTestUI that uses setContent to replace the layout that is the entire purpose of that class. To reduce the risk of this happening, AbstractTestUI.setContent is deprecated. Change-Id: Ica7ffd4f24a0e71ece28e237244a74ae70b354d7 --- .../src/com/vaadin/tests/components/AbstractTestUI.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'uitest') diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java index 5c7076c07e..fe69779b4b 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java +++ b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java @@ -136,6 +136,23 @@ public abstract class AbstractTestUI extends UI { PushConfigurationState.FALLBACK_TRANSPORT_PARAM, "none"); } + /** + * This method is inherited from the super class, but it should generally + * not be used. If you want to just add components to your test, use e.g. + * {@link #addComponent(Component)} instead to add the component to the + * layout used by this UI. If you don't want to use the top-level layout + * used by this class, you instead inherit directly from UI. + * + * @deprecated Use {@link #addComponent(Component)} or inherit from UI + * instead. + */ + @Override + @Deprecated + public void setContent(Component content) { + // Overridden just to deprecate + super.setContent(content); + } + private VerticalLayout layout; protected VerticalLayout getLayout() { -- cgit v1.2.3