From decf2dc1b729301aa8152ffc0ce4742923ae53e9 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 28 Nov 2017 07:09:49 +0900 Subject: [PATCH] Fix assertion locations Closes gh-11171 --- .../AnnotationConfigReactiveWebServerApplicationContext.java | 4 ++-- .../AnnotationConfigServletWebServerApplicationContext.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java index 51c7c1464fc..ccc21547f35 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java @@ -171,9 +171,9 @@ public class AnnotationConfigReactiveWebServerApplicationContext * @see #refresh() */ public final void register(Class... annotatedClasses) { - this.annotatedClasses = annotatedClasses; Assert.notEmpty(annotatedClasses, "At least one annotated class must be specified"); + this.annotatedClasses = annotatedClasses; } /** @@ -184,8 +184,8 @@ public class AnnotationConfigReactiveWebServerApplicationContext * @see #refresh() */ public final void scan(String... basePackages) { - this.basePackages = basePackages; Assert.notEmpty(basePackages, "At least one base package must be specified"); + this.basePackages = basePackages; } @Override diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java index fa0a0cb8715..fafcd727754 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java @@ -169,9 +169,9 @@ public class AnnotationConfigServletWebServerApplicationContext * @see #refresh() */ public final void register(Class... annotatedClasses) { - this.annotatedClasses = annotatedClasses; Assert.notEmpty(annotatedClasses, "At least one annotated class must be specified"); + this.annotatedClasses = annotatedClasses; } /** @@ -182,8 +182,8 @@ public class AnnotationConfigServletWebServerApplicationContext * @see #refresh() */ public final void scan(String... basePackages) { - this.basePackages = basePackages; Assert.notEmpty(basePackages, "At least one base package must be specified"); + this.basePackages = basePackages; } @Override