summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin')
-rw-r--r--server/src/com/vaadin/navigator/Navigator.java8
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);
}