diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-03-15 15:09:32 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-06-08 08:32:16 +0000 |
commit | 3a42436fc9ce52e9689adf7166a9c5698224ec40 (patch) | |
tree | 62bfb4c433c6bd7c61b486424994c81c15a2bc4f /server/src | |
parent | 5ae33b641eea02b647825b27c311d4116f3be838 (diff) | |
download | vaadin-framework-3a42436fc9ce52e9689adf7166a9c5698224ec40.tar.gz vaadin-framework-3a42436fc9ce52e9689adf7166a9c5698224ec40.zip |
Don't allow null view providers (#17028)
Change-Id: I5ce4885f19aaac2d4454b5a368f3e58453cf76f9
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/navigator/Navigator.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/src/com/vaadin/navigator/Navigator.java b/server/src/com/vaadin/navigator/Navigator.java index 65b3fec488..bd2b5711f8 100644 --- a/server/src/com/vaadin/navigator/Navigator.java +++ b/server/src/com/vaadin/navigator/Navigator.java @@ -745,9 +745,15 @@ public class Navigator implements Serializable { * the requested view name is found. * * @param provider - * provider to register + * provider to register, not <code>null</code> + * @throws IllegalArgumentException + * if the provided view provider is <code>null</code> */ public void addProvider(ViewProvider provider) { + if (provider == null) { + throw new IllegalArgumentException( + "Cannot add a null view provider"); + } providers.add(provider); } |