diff options
author | Leif Åstrand <leif@vaadin.com> | 2014-04-03 15:05:10 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2014-04-03 15:05:10 +0300 |
commit | a6c725ca0490b8d42c3468bd9a49ef49571cb59f (patch) | |
tree | 38619b8cc3092c543e97ec3820b930ffca331a74 /uitest | |
parent | 85b6113f5568c9cf2c18906a90c0276e45c2390a (diff) | |
download | vaadin-framework-a6c725ca0490b8d42c3468bd9a49ef49571cb59f.tar.gz vaadin-framework-a6c725ca0490b8d42c3468bd9a49ef49571cb59f.zip |
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
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/AbstractTestUI.java | 17 |
1 files changed, 17 insertions, 0 deletions
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() { |