From 7e97d38de71af0cd26f9e274348bc7d2b4bd5ae8 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 19 Jul 2017 14:38:38 +0200 Subject: [PATCH] Polish Javadoc Closes gh-9726 --- .../autoconfigure/condition/AllNestedConditions.java | 12 ++++++++++-- .../autoconfigure/condition/AnyNestedCondition.java | 12 ++++++++++-- .../condition/NoneNestedConditions.java | 12 ++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java index d430540ab2..b5bb8fe7c6 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,24 @@ import org.springframework.context.annotation.Condition; *
  * static class OnJndiAndProperty extends AllNestedConditions {
  *
+ *    OnJndiAndProperty() {
+ *        super(ConfigurationPhase.PARSE_CONFIGURATION);
+ *    }
+ *
  *    @ConditionalOnJndi()
  *    static class OnJndi {
  *    }
-
+ *
  *    @ConditionalOnProperty("something")
  *    static class OnProperty {
  *    }
  *
  * }
  * 
+ *

+ * The {@link ConfigurationPhase} should be specified according to the conditions that + * are defined. In the example above, all conditions are static and can be evaluated + * early so {@code PARSE_CONFIGURATION} is a right fit. * * @author Phillip Webb * @since 1.3.0 diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java index eea3462424..462bed55b1 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,16 +30,24 @@ import org.springframework.core.annotation.Order; *

  * static class OnJndiOrProperty extends AnyNestedCondition {
  *
+ *    OnJndiOrProperty() {
+ *        super(ConfigurationPhase.PARSE_CONFIGURATION);
+ *    }
+ *
  *    @ConditionalOnJndi()
  *    static class OnJndi {
  *    }
-
+ *
  *    @ConditionalOnProperty("something")
  *    static class OnProperty {
  *    }
  *
  * }
  * 
+ *

+ * The {@link ConfigurationPhase} should be specified according to the conditions that + * are defined. In the example above, all conditions are static and can be evaluated + * early so {@code PARSE_CONFIGURATION} is a right fit. * * @author Phillip Webb * @since 1.2.0 diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java index 9bbe3f5f50..2a164b74d1 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,24 @@ import org.springframework.context.annotation.Condition; *

  * static class OnNeitherJndiNorProperty extends NoneOfNestedConditions {
  *
+ *    OnNeitherJndiNorProperty() {
+ *        super(ConfigurationPhase.PARSE_CONFIGURATION);
+ *    }
+ *
  *    @ConditionalOnJndi()
  *    static class OnJndi {
  *    }
-
+ *
  *    @ConditionalOnProperty("something")
  *    static class OnProperty {
  *    }
  *
  * }
  * 
+ *

+ * The {@link ConfigurationPhase} should be specified according to the conditions that + * are defined. In the example above, all conditions are static and can be evaluated + * early so {@code PARSE_CONFIGURATION} is a right fit. * * @author Phillip Webb * @since 1.3.0