processing, String current, String after) {
if (processing.contains(after)) {
- throw new IllegalStateException("AutoConfigure cycle detected between " + current + " and " + after);
+ throw new IllegalStateException("AutoConfigure cycle detected between %s and %s".formatted(current, after));
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/annotation/config/ImportCandidates.java b/today-context/src/main/java/cn/taketoday/context/annotation/config/ImportCandidates.java
index 0f69e9f4f5..cc08618a46 100644
--- a/today-context/src/main/java/cn/taketoday/context/annotation/config/ImportCandidates.java
+++ b/today-context/src/main/java/cn/taketoday/context/annotation/config/ImportCandidates.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.annotation.config;
@@ -37,7 +34,7 @@
/**
* Contains {@code @Configuration} import candidates, usually auto-configurations.
- *
+ *
* The {@link #load(Class, ClassLoader)} method can be used to discover the import
* candidates.
*
@@ -75,7 +72,7 @@ public ArrayList getCandidates() {
/**
* Loads the names of import candidates from the classpath.
- *
+ *
* The names of the import candidates are stored in files named
* {@code META-INF/config/full-qualified-annotation-name.import} on the classpath.
* Every line contains the full qualified name of the candidate class. Comments are
@@ -111,7 +108,7 @@ private static Enumeration findUrlsInClasspath(ClassLoader classLoader, Str
}
catch (IOException ex) {
throw new IllegalArgumentException(
- "Failed to load configurations from location [" + location + "]", ex);
+ "Failed to load configurations from location [%s]".formatted(location), ex);
}
}
@@ -131,7 +128,7 @@ private static List readCandidateConfigurations(URL url) {
return candidates;
}
catch (IOException ex) {
- throw new IllegalArgumentException("Unable to load configurations from location [" + url + "]", ex);
+ throw new IllegalArgumentException("Unable to load configurations from location [%s]".formatted(url), ex);
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/annotation/config/TypeExcludeFilter.java b/today-context/src/main/java/cn/taketoday/context/annotation/config/TypeExcludeFilter.java
index e4568e5dbd..1b4d82090f 100644
--- a/today-context/src/main/java/cn/taketoday/context/annotation/config/TypeExcludeFilter.java
+++ b/today-context/src/main/java/cn/taketoday/context/annotation/config/TypeExcludeFilter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.annotation.config;
@@ -85,12 +82,12 @@ private Collection getDelegates() {
@Override
public boolean equals(Object obj) {
- throw new IllegalStateException("TypeExcludeFilter " + getClass() + " has not implemented equals");
+ throw new IllegalStateException("TypeExcludeFilter %s has not implemented equals".formatted(getClass()));
}
@Override
public int hashCode() {
- throw new IllegalStateException("TypeExcludeFilter " + getClass() + " has not implemented hashCode");
+ throw new IllegalStateException("TypeExcludeFilter %s has not implemented hashCode".formatted(getClass()));
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/AbstractNestedCondition.java b/today-context/src/main/java/cn/taketoday/context/condition/AbstractNestedCondition.java
index b5dfff1593..e88d690e7b 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/AbstractNestedCondition.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/AbstractNestedCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.condition;
@@ -121,8 +121,8 @@ private void validateMemberCondition(Condition condition, ConfigurationPhase nes
&& condition instanceof ConfigurationCondition ccd) {
ConfigurationPhase memberPhase = ccd.getConfigurationPhase();
if (memberPhase == ConfigurationPhase.REGISTER_BEAN) {
- throw new IllegalStateException("Nested condition " + nestedClassName + " uses a configuration "
- + "phase that is inappropriate for " + condition.getClass());
+ throw new IllegalStateException("Nested condition %s uses a configuration phase that is inappropriate for %s"
+ .formatted(nestedClassName, condition.getClass()));
}
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/AllNestedConditions.java b/today-context/src/main/java/cn/taketoday/context/condition/AllNestedConditions.java
index b06870b410..35fcb700df 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/AllNestedConditions.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/AllNestedConditions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.condition;
@@ -65,8 +65,7 @@ protected ConditionOutcome getFinalMatchOutcome(MemberMatchOutcomes memberOutcom
boolean match = hasSameSize(memberOutcomes.matches, memberOutcomes.all);
List messages = new ArrayList<>();
messages.add(ConditionMessage.forCondition("AllNestedConditions")
- .because(memberOutcomes.matches.size() +
- " matched " + memberOutcomes.nonMatches.size() + " did not"));
+ .because("%d matched %d did not".formatted(memberOutcomes.matches.size(), memberOutcomes.nonMatches.size())));
for (ConditionOutcome outcome : memberOutcomes.all) {
messages.add(outcome.getConditionMessage());
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/AnyNestedCondition.java b/today-context/src/main/java/cn/taketoday/context/condition/AnyNestedCondition.java
index 65fae52711..a3d463d3c6 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/AnyNestedCondition.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/AnyNestedCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.condition;
@@ -65,7 +65,7 @@ protected ConditionOutcome getFinalMatchOutcome(MemberMatchOutcomes memberOutcom
boolean match = !memberOutcomes.matches.isEmpty();
List messages = new ArrayList<>();
messages.add(ConditionMessage.forCondition("AnyNestedCondition")
- .because(memberOutcomes.matches.size() + " matched " + memberOutcomes.nonMatches.size() + " did not"));
+ .because("%d matched %d did not".formatted(memberOutcomes.matches.size(), memberOutcomes.nonMatches.size())));
for (ConditionOutcome outcome : memberOutcomes.all) {
messages.add(outcome.getConditionMessage());
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/InfraCondition.java b/today-context/src/main/java/cn/taketoday/context/condition/InfraCondition.java
index d3b2923226..9a64f50828 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/InfraCondition.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/InfraCondition.java
@@ -50,11 +50,10 @@ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata)
return outcome.isMatch();
}
catch (NoClassDefFoundError ex) {
- throw new IllegalStateException("Could not evaluate condition on " + classOrMethodName + " due to "
- + ex.getMessage() + " not found. Make sure your own configuration does not rely on "
- + "that class. This can also happen if you are "
- + "@ComponentScanning a today-framework package (e.g. if you "
- + "put a @ComponentScan in the default package by mistake)", ex);
+ throw new IllegalStateException("""
+ Could not evaluate condition on %s due to %s not found. Make sure your own configuration does not rely on that class. \
+ This can also happen if you are @ComponentScanning a today-framework package (e.g. if you put a @ComponentScan in the \
+ default package by mistake)""".formatted(classOrMethodName, ex.getMessage()), ex);
}
catch (RuntimeException ex) {
throw new IllegalStateException("Error processing condition on " + getName(metadata), ex);
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/NoneNestedConditions.java b/today-context/src/main/java/cn/taketoday/context/condition/NoneNestedConditions.java
index b8491069df..00267d93c0 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/NoneNestedConditions.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/NoneNestedConditions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.condition;
@@ -64,8 +64,7 @@ protected ConditionOutcome getFinalMatchOutcome(MemberMatchOutcomes memberOutcom
boolean match = memberOutcomes.matches.isEmpty();
List messages = new ArrayList<>();
messages.add(ConditionMessage.forCondition("NoneNestedConditions")
- .because(memberOutcomes.matches.size()
- + " matched " + memberOutcomes.nonMatches.size() + " did not"));
+ .because("%d matched %d did not".formatted(memberOutcomes.matches.size(), memberOutcomes.nonMatches.size())));
for (ConditionOutcome outcome : memberOutcomes.all) {
messages.add(outcome.getConditionMessage());
}
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/OnBeanCondition.java b/today-context/src/main/java/cn/taketoday/context/condition/OnBeanCondition.java
index 603dff6a27..74b51cb877 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/OnBeanCondition.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/OnBeanCondition.java
@@ -150,7 +150,7 @@ public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeM
.noMatch(spec.message().found("multiple primary beans").items(Style.QUOTE, primaryBeans));
}
matchMessage = spec.message(matchMessage)
- .found("a single primary bean '" + primaryBeans.get(0) + "' from beans")
+ .found("a single primary bean '%s' from beans".formatted(primaryBeans.get(0)))
.items(Style.QUOTE, allBeans);
}
}
@@ -651,9 +651,8 @@ protected Set extractTypes(MultiValueMap attributes) {
@Override
protected void validate(BeanTypeDeductionException ex) {
if (types.size() != 1) {
- throw new IllegalArgumentException(
- getAnnotationName() + " annotations must specify only one type (got "
- + StringUtils.collectionToCommaDelimitedString(types) + ")");
+ throw new IllegalArgumentException("%s annotations must specify only one type (got %s)"
+ .formatted(getAnnotationName(), StringUtils.collectionToCommaDelimitedString(types)));
}
}
@@ -723,7 +722,7 @@ static final class BeanTypeDeductionException extends RuntimeException {
private static final long serialVersionUID = 1L;
private BeanTypeDeductionException(String className, String beanMethodName, Throwable cause) {
- super("Failed to deduce bean type for " + className + "." + beanMethodName, cause);
+ super("Failed to deduce bean type for %s.%s".formatted(className, beanMethodName), cause);
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/OnClassCondition.java b/today-context/src/main/java/cn/taketoday/context/condition/OnClassCondition.java
index 4adb411f74..a11ea91afd 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/OnClassCondition.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/OnClassCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.condition;
@@ -56,8 +56,7 @@ protected ConditionOutcome[] getOutcomes(String[] configClasses, AutoConfigurati
}
}
- private ConditionOutcome[] resolveOutcomesThreaded(
- String[] configClasses, AutoConfigurationMetadata configMetadata) {
+ private ConditionOutcome[] resolveOutcomesThreaded(String[] configClasses, AutoConfigurationMetadata configMetadata) {
int split = configClasses.length / 2;
OutcomesResolver firstHalfResolver = createOutcomesResolver(configClasses, 0, split, configMetadata);
OutcomesResolver secondHalfResolver = new StandardOutcomesResolver(
diff --git a/today-context/src/main/java/cn/taketoday/context/condition/OnJndiCondition.java b/today-context/src/main/java/cn/taketoday/context/condition/OnJndiCondition.java
index 7df1106ac4..967e112853 100644
--- a/today-context/src/main/java/cn/taketoday/context/condition/OnJndiCondition.java
+++ b/today-context/src/main/java/cn/taketoday/context/condition/OnJndiCondition.java
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2017 - 2024 the original author or authors.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
+ */
+
package cn.taketoday.context.condition;
import javax.naming.NamingException;
@@ -49,7 +66,7 @@ private ConditionOutcome getMatchOutcome(String[] locations) {
if (location != null) {
return ConditionOutcome.match(
ConditionMessage.forCondition(ConditionalOnJndi.class, details)
- .foundExactly("\"" + location + "\"")
+ .foundExactly("\"%s\"".formatted(location))
);
}
return ConditionOutcome.noMatch(
diff --git a/today-context/src/main/java/cn/taketoday/context/config/AbstractPropertyLoadingBeanDefinitionParser.java b/today-context/src/main/java/cn/taketoday/context/config/AbstractPropertyLoadingBeanDefinitionParser.java
index 84e28f463a..8bdace179a 100644
--- a/today-context/src/main/java/cn/taketoday/context/config/AbstractPropertyLoadingBeanDefinitionParser.java
+++ b/today-context/src/main/java/cn/taketoday/context/config/AbstractPropertyLoadingBeanDefinitionParser.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © Harry Yang & 2017 - 2023 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.config;
@@ -34,6 +31,7 @@
* @author Juergen Hoeller
* @author Arjen Poutsma
* @author Dave Syer
+ * @author Harry Yang
* @since 4.0
*/
abstract class AbstractPropertyLoadingBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
diff --git a/today-context/src/main/java/cn/taketoday/context/event/AbstractApplicationEventMulticaster.java b/today-context/src/main/java/cn/taketoday/context/event/AbstractApplicationEventMulticaster.java
index 4b1751b7fc..8600c59c79 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/AbstractApplicationEventMulticaster.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/AbstractApplicationEventMulticaster.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.event;
@@ -338,9 +338,7 @@ private Collection> retrieveApplicationListeners(
* @see #supportsEvent(Class, ResolvableType)
* @see #supportsEvent(ApplicationListener, ResolvableType, Class)
*/
- private boolean supportsEvent(
- ConfigurableBeanFactory beanFactory, String listenerBeanName, ResolvableType eventType) {
-
+ private boolean supportsEvent(ConfigurableBeanFactory beanFactory, String listenerBeanName, ResolvableType eventType) {
Class> listenerType = beanFactory.getType(listenerBeanName);
if (listenerType == null
|| GenericApplicationListener.class.isAssignableFrom(listenerType)
@@ -395,7 +393,7 @@ protected boolean supportsEvent(Class> listenerType, ResolvableType eventType)
protected boolean supportsEvent(ApplicationListener> listener, ResolvableType eventType, @Nullable Class> sourceType) {
GenericApplicationListener smartListener
= listener instanceof GenericApplicationListener
- ? (GenericApplicationListener) listener : new GenericApplicationListenerAdapter(listener);
+ ? (GenericApplicationListener) listener : new GenericApplicationListenerAdapter(listener);
return smartListener.supportsEventType(eventType) && smartListener.supportsSourceType(sourceType);
}
diff --git a/today-context/src/main/java/cn/taketoday/context/event/ApplicationListenerMethodAdapter.java b/today-context/src/main/java/cn/taketoday/context/event/ApplicationListenerMethodAdapter.java
index 0d074c0cd7..af6fe0ae39 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/ApplicationListenerMethodAdapter.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/ApplicationListenerMethodAdapter.java
@@ -447,11 +447,8 @@ protected void handleAsyncError(Throwable t) {
* @param message error message to append the HandlerMethod details to
*/
protected String getDetailedErrorMessage(Object bean, String message) {
- StringBuilder sb = new StringBuilder(message).append('\n');
- sb.append("HandlerMethod details: \n");
- sb.append("Bean [").append(bean.getClass().getName()).append("]\n");
- sb.append("Method [").append(this.targetMethod.toGenericString()).append("]\n");
- return sb.toString();
+ return "%s\nHandlerMethod details: \nBean [%s]\nMethod [%s]\n"
+ .formatted(message, bean.getClass().getName(), this.targetMethod.toGenericString());
}
/**
@@ -465,10 +462,9 @@ private void assertTargetBean(Method method, Object targetBean, Object[] args) {
Class> methodDeclaringClass = method.getDeclaringClass();
Class> targetBeanClass = targetBean.getClass();
if (!methodDeclaringClass.isAssignableFrom(targetBeanClass)) {
- String msg = "The event listener method class '" + methodDeclaringClass.getName() +
- "' is not an instance of the actual bean class '" +
- targetBeanClass.getName() + "'. If the bean requires proxying " +
- "(e.g. due to @Transactional), please use class-based proxying.";
+ String msg = ("The event listener method class '%s' is not an instance of the actual bean class '%s'. " +
+ "If the bean requires proxying (e.g. due to @Transactional), please use class-based proxying.")
+ .formatted(methodDeclaringClass.getName(), targetBeanClass.getName());
throw new IllegalStateException(getInvocationErrorMessage(targetBean, msg, args));
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/event/ContextStartedEvent.java b/today-context/src/main/java/cn/taketoday/context/event/ContextStartedEvent.java
index 80e50c866e..8ae5c5aec4 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/ContextStartedEvent.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/ContextStartedEvent.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,8 +12,9 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
+
package cn.taketoday.context.event;
import cn.taketoday.context.ApplicationContext;
@@ -24,8 +22,8 @@
/**
* Event raised when an {@code ApplicationContext} gets started.
*
- * @author TODAY
- * 2018-09-10 10:52
+ * @author Harry Yang
+ * @since 2018-09-10 10:52
*/
@SuppressWarnings("serial")
public class ContextStartedEvent extends ApplicationContextEvent {
diff --git a/today-context/src/main/java/cn/taketoday/context/event/ContextStoppedEvent.java b/today-context/src/main/java/cn/taketoday/context/event/ContextStoppedEvent.java
index 2d8eec6231..ea0a6353e5 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/ContextStoppedEvent.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/ContextStoppedEvent.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,8 +12,9 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
+
package cn.taketoday.context.event;
import cn.taketoday.context.ApplicationContext;
diff --git a/today-context/src/main/java/cn/taketoday/context/event/EventListenerFactory.java b/today-context/src/main/java/cn/taketoday/context/event/EventListenerFactory.java
index be06a837d5..6ce0fb51c3 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/EventListenerFactory.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/EventListenerFactory.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.event;
@@ -29,6 +26,7 @@
* annotated with {@link EventListener}.
*
* @author Stephane Nicoll
+ * @author Harry Yang
* @since 4.0
*/
public interface EventListenerFactory {
diff --git a/today-context/src/main/java/cn/taketoday/context/event/EventListenerMethodProcessor.java b/today-context/src/main/java/cn/taketoday/context/event/EventListenerMethodProcessor.java
index ad7ae8eecd..3e6459137d 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/EventListenerMethodProcessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/EventListenerMethodProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.event;
@@ -116,8 +116,8 @@ public void afterSingletonsInstantiated(ConfigurableBeanFactory beanFactory) {
process(beanName, type, factories, evaluator, nonAnnotatedClasses);
}
catch (Throwable ex) {
- throw new BeanInitializationException("Failed to process @EventListener " +
- "annotation on bean with name '" + beanName + "': " + ex.getMessage(), ex);
+ throw new BeanInitializationException("Failed to process @EventListener annotation on bean with name '%s': %s"
+ .formatted(beanName, ex.getMessage()), ex);
}
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/event/EventPublicationInterceptor.java b/today-context/src/main/java/cn/taketoday/context/event/EventPublicationInterceptor.java
index 1f44676c06..67c951f689 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/EventPublicationInterceptor.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/EventPublicationInterceptor.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.event;
@@ -53,8 +50,7 @@
* @see cn.taketoday.context.ApplicationContext
* @since 4.0 2021/12/3 10:11
*/
-public class EventPublicationInterceptor
- implements MethodInterceptor, ApplicationEventPublisherAware, InitializingBean {
+public class EventPublicationInterceptor implements MethodInterceptor, ApplicationEventPublisherAware, InitializingBean {
@Nullable
private Constructor> applicationEventConstructor;
@@ -83,8 +79,8 @@ public void setApplicationEventClass(Class> applicationEventClass) {
this.applicationEventConstructor = applicationEventClass.getConstructor(Object.class);
}
catch (NoSuchMethodException ex) {
- throw new IllegalArgumentException("ApplicationEvent class [" +
- applicationEventClass.getName() + "] does not have the required Object constructor: " + ex);
+ throw new IllegalArgumentException("ApplicationEvent class [%s] does not have the required Object constructor: %s"
+ .formatted(applicationEventClass.getName(), ex));
}
}
diff --git a/today-context/src/main/java/cn/taketoday/context/event/GenericApplicationListenerAdapter.java b/today-context/src/main/java/cn/taketoday/context/event/GenericApplicationListenerAdapter.java
index b05ca11771..8445308926 100644
--- a/today-context/src/main/java/cn/taketoday/context/event/GenericApplicationListenerAdapter.java
+++ b/today-context/src/main/java/cn/taketoday/context/event/GenericApplicationListenerAdapter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.event;
@@ -37,6 +34,7 @@
*
* @author Juergen Hoeller
* @author Stephane Nicoll
+ * @author Harry Yang
* @see ApplicationListener#onApplicationEvent
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/context/expression/BeanFactoryAccessor.java b/today-context/src/main/java/cn/taketoday/context/expression/BeanFactoryAccessor.java
index 00b8c3c2dc..3c82675340 100644
--- a/today-context/src/main/java/cn/taketoday/context/expression/BeanFactoryAccessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/expression/BeanFactoryAccessor.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.expression;
@@ -34,6 +31,7 @@
*
* @author Juergen Hoeller
* @author Andy Clement
+ * @author Harry Yang
* @since 3.0
*/
public class BeanFactoryAccessor implements PropertyAccessor {
diff --git a/today-context/src/main/java/cn/taketoday/context/expression/CachedExpressionEvaluator.java b/today-context/src/main/java/cn/taketoday/context/expression/CachedExpressionEvaluator.java
index ab65618a84..0e7386a0c7 100644
--- a/today-context/src/main/java/cn/taketoday/context/expression/CachedExpressionEvaluator.java
+++ b/today-context/src/main/java/cn/taketoday/context/expression/CachedExpressionEvaluator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.expression;
@@ -131,7 +131,7 @@ public int hashCode() {
@Override
public String toString() {
- return this.element + " with expression \"" + this.expression + "\"";
+ return "%s with expression \"%s\"".formatted(this.element, this.expression);
}
@Override
diff --git a/today-context/src/main/java/cn/taketoday/context/expression/EnvironmentAccessor.java b/today-context/src/main/java/cn/taketoday/context/expression/EnvironmentAccessor.java
index 27a2e98356..1e7c2e24ee 100644
--- a/today-context/src/main/java/cn/taketoday/context/expression/EnvironmentAccessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/expression/EnvironmentAccessor.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.expression;
@@ -33,6 +30,7 @@
* of a {@link Environment} instance.
*
* @author Chris Beams
+ * @author Harry Yang
* @since 4.0
*/
public class EnvironmentAccessor implements PropertyAccessor {
diff --git a/today-context/src/main/java/cn/taketoday/context/expression/MapAccessor.java b/today-context/src/main/java/cn/taketoday/context/expression/MapAccessor.java
index 43ef5ebaf4..a76165d734 100644
--- a/today-context/src/main/java/cn/taketoday/context/expression/MapAccessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/expression/MapAccessor.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.expression;
@@ -38,6 +35,7 @@
*
* @author Juergen Hoeller
* @author Andy Clement
+ * @author Harry Yang
* @since 4.0
*/
public class MapAccessor implements CompilablePropertyAccessor {
diff --git a/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBeanRegistrar.java b/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBeanRegistrar.java
index 6969c2f193..cc05c02e20 100644
--- a/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBeanRegistrar.java
+++ b/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBeanRegistrar.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © Harry Yang & 2017 - 2023 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.properties;
@@ -89,9 +86,7 @@ private boolean containsBeanDefinition(@Nullable BeanFactory beanFactory, String
private void registerBeanDefinition(String beanName,
Class> type, MergedAnnotation annotation) {
if (!annotation.isPresent()) {
- throw new IllegalStateException(
- "No " + ConfigurationProperties.class.getSimpleName()
- + " annotation found on '" + type.getName() + "'.");
+ throw new IllegalStateException("No %s annotation found on '%s'.".formatted(ConfigurationProperties.class.getSimpleName(), type.getName()));
}
this.registry.registerBeanDefinition(beanName, createBeanDefinition(beanName, type));
}
diff --git a/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBindingPostProcessor.java b/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBindingPostProcessor.java
index 231a22a27c..f084efd77b 100644
--- a/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBindingPostProcessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/properties/ConfigurationPropertiesBindingPostProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.properties;
@@ -94,9 +94,8 @@ private void bind(@Nullable ConfigurationPropertiesBean bean) {
return;
}
if (bean.asBindTarget().getBindMethod() == BindMethod.VALUE_OBJECT) {
- throw new IllegalStateException(
- "Cannot bind @ConfigurationProperties for bean '" + bean.getName() +
- "'. Ensure that @ConstructorBinding has not been applied to regular bean");
+ throw new IllegalStateException("Cannot bind @ConfigurationProperties for bean '%s'. Ensure that @ConstructorBinding has not been applied to regular bean"
+ .formatted(bean.getName()));
}
try {
this.binder.bind(bean);
diff --git a/today-context/src/main/java/cn/taketoday/context/support/ApplicationListenerDetector.java b/today-context/src/main/java/cn/taketoday/context/support/ApplicationListenerDetector.java
index de6a829da6..868c206c03 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/ApplicationListenerDetector.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/ApplicationListenerDetector.java
@@ -45,6 +45,7 @@
* defensively mark this post-processor's field state as {@code transient}.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @since 4.0
*/
final class ApplicationListenerDetector
diff --git a/today-context/src/main/java/cn/taketoday/context/support/ApplicationObjectSupport.java b/today-context/src/main/java/cn/taketoday/context/support/ApplicationObjectSupport.java
index 7dcc0f5221..0f968c0a43 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/ApplicationObjectSupport.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/ApplicationObjectSupport.java
@@ -69,7 +69,7 @@ else if (this.applicationContext == null) {
// Initialize with passed-in context.
if (!requiredContextClass().isInstance(context)) {
throw new ApplicationContextException(
- "Invalid application context: needs to be of type [" + requiredContextClass().getName() + "]");
+ "Invalid application context: needs to be of type [%s]".formatted(requiredContextClass().getName()));
}
this.applicationContext = context;
initApplicationContext(context);
@@ -77,9 +77,8 @@ else if (this.applicationContext == null) {
else {
// Ignore reinitialization if same context passed in.
if (this.applicationContext != context) {
- throw new ApplicationContextException(
- "Cannot reinitialize with different application context: current one is [" +
- this.applicationContext + "], passed-in one is [" + context + "]");
+ throw new ApplicationContextException("Cannot reinitialize with different application context: current one is [%s], passed-in one is [%s]"
+ .formatted(this.applicationContext, context));
}
}
}
@@ -124,7 +123,7 @@ public final ApplicationContext getApplicationContext() throws IllegalStateExcep
ApplicationContext context = this.applicationContext;
if (context == null && isContextRequired()) {
throw new IllegalStateException(
- "ApplicationContextSupport instance [" + this + "] does not run in an ApplicationContext");
+ "ApplicationContextSupport instance [%s] does not run in an ApplicationContext".formatted(this));
}
return context;
}
@@ -176,7 +175,7 @@ protected final MessageSourceAccessor getMessageSourceAccessor() throws IllegalS
if (context == null) {
if (isContextRequired()) {
throw new IllegalStateException(
- "ApplicationObjectSupport instance [" + this + "] does not run in an ApplicationContext");
+ "ApplicationObjectSupport instance [%s] does not run in an ApplicationContext".formatted(this));
}
return null;
}
diff --git a/today-context/src/main/java/cn/taketoday/context/support/DefaultLifecycleProcessor.java b/today-context/src/main/java/cn/taketoday/context/support/DefaultLifecycleProcessor.java
index a1c1efbfed..af5836d752 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/DefaultLifecycleProcessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/DefaultLifecycleProcessor.java
@@ -290,7 +290,7 @@ private void doStart(Map lifecycleBeans, String bea
bean.start();
}
catch (Throwable ex) {
- throw new ApplicationContextException("Failed to start bean '" + beanName + "'", ex);
+ throw new ApplicationContextException("Failed to start bean '%s'".formatted(beanName), ex);
}
log.debug("Successfully started bean '{}'", beanName);
}
@@ -487,9 +487,8 @@ else if (member.bean instanceof SmartLifecycle) {
try {
latch.await(timeout, TimeUnit.MILLISECONDS);
if (latch.getCount() > 0 && !countDownBeanNames.isEmpty() && log.isInfoEnabled()) {
- log.info("Shutdown phase " + this.phase + " ends with " + countDownBeanNames.size() +
- " bean" + (countDownBeanNames.size() > 1 ? "s" : "") +
- " still running after timeout of " + this.timeout + "ms: " + countDownBeanNames);
+ log.info("Shutdown phase %d ends with %d bean%s still running after timeout of %dms: %s"
+ .formatted(this.phase, countDownBeanNames.size(), countDownBeanNames.size() > 1 ? "s" : "", this.timeout, countDownBeanNames));
}
}
catch (InterruptedException ex) {
diff --git a/today-context/src/main/java/cn/taketoday/context/support/DefaultMessageSourceResolvable.java b/today-context/src/main/java/cn/taketoday/context/support/DefaultMessageSourceResolvable.java
index 7eb84b81cd..9bc39379c3 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/DefaultMessageSourceResolvable.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/DefaultMessageSourceResolvable.java
@@ -91,9 +91,7 @@ public DefaultMessageSourceResolvable(String[] codes, Object[] arguments) {
* @param arguments the array of arguments to be used to resolve this message
* @param defaultMessage the default message to be used to resolve this message
*/
- public DefaultMessageSourceResolvable(
- @Nullable String[] codes, @Nullable Object[] arguments, @Nullable String defaultMessage) {
-
+ public DefaultMessageSourceResolvable(@Nullable String[] codes, @Nullable Object[] arguments, @Nullable String defaultMessage) {
this.codes = codes;
this.arguments = arguments;
this.defaultMessage = defaultMessage;
@@ -155,11 +153,9 @@ public boolean shouldRenderDefaultMessage() {
* including codes, arguments, and default message.
*/
protected final String resolvableToString() {
- StringBuilder result = new StringBuilder(64);
- result.append("codes [").append(StringUtils.arrayToDelimitedString(this.codes, ","));
- result.append("]; arguments [").append(StringUtils.arrayToDelimitedString(this.arguments, ","));
- result.append("]; default message [").append(this.defaultMessage).append(']');
- return result.toString();
+ return "codes [%s]; arguments [%s]; default message [%s]".formatted(
+ StringUtils.arrayToDelimitedString(this.codes, ","),
+ StringUtils.arrayToDelimitedString(this.arguments, ","), this.defaultMessage);
}
/**
diff --git a/today-context/src/main/java/cn/taketoday/context/support/DelegatingMessageSource.java b/today-context/src/main/java/cn/taketoday/context/support/DelegatingMessageSource.java
index 52ec582572..36a12af35e 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/DelegatingMessageSource.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/DelegatingMessageSource.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.support;
@@ -36,6 +33,7 @@
* define its own MessageSource. Not intended for direct use in applications.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see AbstractApplicationContext
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/context/support/MessageSourceAccessor.java b/today-context/src/main/java/cn/taketoday/context/support/MessageSourceAccessor.java
index 25c7f250dd..9645302796 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/MessageSourceAccessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/MessageSourceAccessor.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © Harry Yang & 2017 - 2023 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.support;
@@ -36,6 +33,7 @@
* as a standalone helper to delegate to in application objects.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see ApplicationObjectSupport#getMessageSourceAccessor
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/context/support/MessageSourceResourceBundle.java b/today-context/src/main/java/cn/taketoday/context/support/MessageSourceResourceBundle.java
index 4e9aca0c7e..cc8b97bea0 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/MessageSourceResourceBundle.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/MessageSourceResourceBundle.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.support;
@@ -35,6 +32,7 @@
* Used for example to expose a Framework MessageSource to JSTL web views.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see cn.taketoday.context.MessageSource
* @see java.util.ResourceBundle
* @since 4.0
diff --git a/today-context/src/main/java/cn/taketoday/context/support/ResourceBundleMessageSource.java b/today-context/src/main/java/cn/taketoday/context/support/ResourceBundleMessageSource.java
index cbb6b1a465..d7659bedb9 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/ResourceBundleMessageSource.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/ResourceBundleMessageSource.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.support;
@@ -73,13 +70,13 @@
* @author Rod Johnson
* @author Juergen Hoeller
* @author Qimiao Chen
+ * @author Harry Yang
* @see #setBasenames
* @see ReloadableResourceBundleMessageSource
* @see java.util.ResourceBundle
* @see java.text.MessageFormat
*/
-public class ResourceBundleMessageSource
- extends AbstractResourceBasedMessageSource implements BeanClassLoaderAware {
+public class ResourceBundleMessageSource extends AbstractResourceBasedMessageSource implements BeanClassLoaderAware {
@Nullable
private ClassLoader bundleClassLoader;
@@ -94,7 +91,7 @@ public class ResourceBundleMessageSource
* This allows for very efficient hash lookups, significantly faster
* than the ResourceBundle class's own cache.
*/
- private final Map> cachedResourceBundles =
+ private final ConcurrentHashMap> cachedResourceBundles =
new ConcurrentHashMap<>();
/**
@@ -106,7 +103,7 @@ public class ResourceBundleMessageSource
*
* @see #getMessageFormat
*/
- private final Map>> cachedBundleMessageFormats =
+ private final ConcurrentHashMap>> cachedBundleMessageFormats =
new ConcurrentHashMap<>();
@Nullable
@@ -218,7 +215,7 @@ protected ResourceBundle getResourceBundle(String basename, Locale locale) {
}
catch (MissingResourceException ex) {
if (logger.isWarnEnabled()) {
- logger.warn("ResourceBundle [" + basename + "] not found for MessageSource: " + ex.getMessage());
+ logger.warn("ResourceBundle [{}] not found for MessageSource: {}", basename, ex.getMessage());
}
// Assume bundle not found
// -> do NOT throw the exception to allow for checking parent message source.
@@ -251,11 +248,11 @@ protected ResourceBundle doGetBundle(String basename, Locale locale) throws Miss
this.control = null;
String encoding = getDefaultEncoding();
if (encoding != null && logger.isInfoEnabled()) {
- logger.info("ResourceBundleMessageSource is configured to read resources with encoding '" +
- encoding + "' but ResourceBundle.Control not supported in current system environment: " +
- ex.getMessage() + " - falling back to plain ResourceBundle.getBundle retrieval with the " +
- "platform default encoding. Consider setting the 'defaultEncoding' property to 'null' " +
- "for participating in the platform default and therefore avoiding this log message.");
+ logger.info("""
+ ResourceBundleMessageSource is configured to read resources with encoding '%s' but ResourceBundle.Control not supported \
+ in current system environment: %s - falling back to plain ResourceBundle.getBundle retrieval with the platform default \
+ encoding. Consider setting the 'defaultEncoding' property to 'null' for participating in the platform default and \
+ therefore avoiding this log message.""".formatted(encoding, ex.getMessage()));
}
}
}
@@ -451,9 +448,7 @@ public long getTimeToLive(String baseName, Locale locale) {
}
@Override
- public boolean needsReload(
- String baseName, Locale locale, String format, ClassLoader loader, ResourceBundle bundle, long loadTime) {
-
+ public boolean needsReload(String baseName, Locale locale, String format, ClassLoader loader, ResourceBundle bundle, long loadTime) {
if (super.needsReload(baseName, locale, format, loader, bundle, loadTime)) {
cachedBundleMessageFormats.remove(bundle);
return true;
diff --git a/today-context/src/main/java/cn/taketoday/context/support/StaticApplicationContext.java b/today-context/src/main/java/cn/taketoday/context/support/StaticApplicationContext.java
index 11e10bb9e2..47b160f281 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/StaticApplicationContext.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/StaticApplicationContext.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.support;
@@ -34,6 +31,7 @@
*
* @author Rod Johnson
* @author Juergen Hoeller
+ * @author Harry Yang
* @see #registerSingleton
* @see #registerPrototype
* @see #registerBeanDefinition
diff --git a/today-context/src/main/java/cn/taketoday/context/support/StaticMessageSource.java b/today-context/src/main/java/cn/taketoday/context/support/StaticMessageSource.java
index e5076fc8ae..7c5454e7b4 100644
--- a/today-context/src/main/java/cn/taketoday/context/support/StaticMessageSource.java
+++ b/today-context/src/main/java/cn/taketoday/context/support/StaticMessageSource.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2021 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.support;
@@ -37,6 +34,7 @@
*
* @author Rod Johnson
* @author Juergen Hoeller
+ * @author Harry Yang
*/
public class StaticMessageSource extends AbstractMessageSource {
diff --git a/today-context/src/main/java/cn/taketoday/context/weaving/AspectJWeavingEnabler.java b/today-context/src/main/java/cn/taketoday/context/weaving/AspectJWeavingEnabler.java
index c152bb08bd..d99955dd0f 100644
--- a/today-context/src/main/java/cn/taketoday/context/weaving/AspectJWeavingEnabler.java
+++ b/today-context/src/main/java/cn/taketoday/context/weaving/AspectJWeavingEnabler.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,8 +12,9 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
+
package cn.taketoday.context.weaving;
import org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter;
@@ -29,9 +27,9 @@
import cn.taketoday.beans.factory.BeanClassLoaderAware;
import cn.taketoday.beans.factory.config.BeanFactoryPostProcessor;
import cn.taketoday.beans.factory.config.ConfigurableBeanFactory;
+import cn.taketoday.core.Ordered;
import cn.taketoday.instrument.classloading.InstrumentationLoadTimeWeaver;
import cn.taketoday.instrument.classloading.LoadTimeWeaver;
-import cn.taketoday.core.Ordered;
import cn.taketoday.lang.Nullable;
/**
@@ -42,10 +40,10 @@
*
* @author Juergen Hoeller
* @author Ramnivas Laddad
+ * @author Harry Yang
* @since 4.0
*/
-public class AspectJWeavingEnabler
- implements BeanFactoryPostProcessor, BeanClassLoaderAware, LoadTimeWeaverAware, Ordered {
+public class AspectJWeavingEnabler implements BeanFactoryPostProcessor, BeanClassLoaderAware, LoadTimeWeaverAware, Ordered {
/**
* The {@code aop.xml} resource location.
diff --git a/today-context/src/main/java/cn/taketoday/context/weaving/DefaultContextLoadTimeWeaver.java b/today-context/src/main/java/cn/taketoday/context/weaving/DefaultContextLoadTimeWeaver.java
index 934e320ea6..0a193d7e43 100644
--- a/today-context/src/main/java/cn/taketoday/context/weaving/DefaultContextLoadTimeWeaver.java
+++ b/today-context/src/main/java/cn/taketoday/context/weaving/DefaultContextLoadTimeWeaver.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.weaving;
@@ -24,8 +21,8 @@
import cn.taketoday.beans.factory.BeanClassLoaderAware;
import cn.taketoday.beans.factory.DisposableBean;
-import cn.taketoday.instrument.classloading.InstrumentationLoadTimeWeaver;
import cn.taketoday.instrument.InstrumentationSavingAgent;
+import cn.taketoday.instrument.classloading.InstrumentationLoadTimeWeaver;
import cn.taketoday.instrument.classloading.LoadTimeWeaver;
import cn.taketoday.instrument.classloading.ReflectiveLoadTimeWeaver;
import cn.taketoday.instrument.classloading.TomcatLoadTimeWeaver;
@@ -51,6 +48,7 @@
* @author Juergen Hoeller
* @author Ramnivas Laddad
* @author Costin Leau
+ * @author Harry Yang
* @see cn.taketoday.context.ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/context/weaving/LoadTimeWeaverAwareProcessor.java b/today-context/src/main/java/cn/taketoday/context/weaving/LoadTimeWeaverAwareProcessor.java
index fba5e49758..7287855da8 100644
--- a/today-context/src/main/java/cn/taketoday/context/weaving/LoadTimeWeaverAwareProcessor.java
+++ b/today-context/src/main/java/cn/taketoday/context/weaving/LoadTimeWeaverAwareProcessor.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.context.weaving;
@@ -41,6 +38,7 @@
* Applications should not use this class directly.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see LoadTimeWeaverAware
* @see cn.taketoday.context.ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME
* @since 4.0
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatter.java
index 489753c7ae..b0e772570f 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime;
@@ -46,6 +43,7 @@
* @author Juergen Hoeller
* @author Phillip Webb
* @author Sam Brannen
+ * @author Harry Yang
* @see SimpleDateFormat
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatterRegistrar.java b/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatterRegistrar.java
index 69360f5b7a..3d56f8685f 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatterRegistrar.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/DateFormatterRegistrar.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime;
@@ -40,6 +37,7 @@
* ad-hoc use against any {@code ConverterRegistry} instance.
*
* @author Phillip Webb
+ * @author Harry Yang
* @see cn.taketoday.format.datetime.standard.DateTimeFormatterRegistrar
* @see FormatterRegistrar#registerFormatters
* @since 4.0
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/DateTimeFormatAnnotationFormatterFactory.java b/today-context/src/main/java/cn/taketoday/format/datetime/DateTimeFormatAnnotationFormatterFactory.java
index 74af40b431..30bea294ce 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/DateTimeFormatAnnotationFormatterFactory.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/DateTimeFormatAnnotationFormatterFactory.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime;
@@ -38,6 +35,7 @@
*
* @author Phillip Webb
* @author Sam Brannen
+ * @author Harry Yang
* @since 4.0
*/
public class DateTimeFormatAnnotationFormatterFactory extends EmbeddedValueResolutionSupport
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContext.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContext.java
index aabfc143d0..7f659a5fa9 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContext.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContext.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -36,6 +33,7 @@
*
A {@code null} property value indicates the user has not specified a setting.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see DateTimeContextHolder
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContextHolder.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContextHolder.java
index a2b3b0b9d4..a36990f73b 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContextHolder.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeContextHolder.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -30,6 +27,7 @@
* A holder for a thread-local user {@link DateTimeContext}.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see cn.taketoday.core.i18n.LocaleContextHolder
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeConverters.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeConverters.java
index 298aafc959..9025b98d50 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeConverters.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeConverters.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -43,6 +40,7 @@
* and also between {@link Calendar} and JSR-310 value types.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @since 4.0
*/
final class DateTimeConverters {
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactory.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactory.java
index b919b6d2c6..3facd8836a 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactory.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactory.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -38,6 +35,7 @@
* @author Juergen Hoeller
* @author Phillip Webb
* @author Sam Brannen
+ * @author Harry Yang
* @see #createDateTimeFormatter()
* @see #createDateTimeFormatter(DateTimeFormatter)
* @see #setPattern
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactoryBean.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactoryBean.java
index 3cec60eee2..d132bce898 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactoryBean.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterFactoryBean.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* See the {@link DateTimeFormatterFactory base class} for configuration details.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see #setPattern
* @see #setIso
* @see #setDateStyle
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterRegistrar.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterRegistrar.java
index 48c8f6df6e..e64f616313 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterRegistrar.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterRegistrar.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -46,6 +43,7 @@
*
* @author Juergen Hoeller
* @author Phillip Webb
+ * @author Harry Yang
* @see #setDateStyle
* @see #setTimeStyle
* @see #setDateTimeStyle
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterUtils.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterUtils.java
index e73f523293..2a11a6a92a 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterUtils.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DateTimeFormatterUtils.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -29,6 +26,7 @@
* Internal {@link DateTimeFormatter} utilities.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @since 4.0
*/
abstract class DateTimeFormatterUtils {
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DurationFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DurationFormatter.java
index 42807165fa..4445abe04a 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/DurationFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/DurationFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* following JSR-310's parsing rules for a Duration.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see Duration#parse
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/InstantFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/InstantFormatter.java
index 22f93a87de..62c7c2a8b6 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/InstantFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/InstantFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © Harry Yang & 2017 - 2023 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -36,6 +33,7 @@
*
* @author Juergen Hoeller
* @author Andrei Nevedomskii
+ * @author Harry Yang
* @see Instant#parse
* @see DateTimeFormatter#ISO_INSTANT
* @see DateTimeFormatter#RFC_1123_DATE_TIME
@@ -49,7 +47,7 @@ public Instant parse(String text, Locale locale) throws ParseException {
return Instant.ofEpochMilli(Long.parseLong(text));
}
catch (NumberFormatException ex) {
- if (text.length() > 0 && Character.isAlphabetic(text.charAt(0))) {
+ if (!text.isEmpty() && Character.isAlphabetic(text.charAt(0))) {
// assuming RFC-1123 value a la "Tue, 3 Jun 2008 11:05:30 GMT"
return Instant.from(DateTimeFormatter.RFC_1123_DATE_TIME.parse(text));
}
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/Jsr310DateTimeFormatAnnotationFormatterFactory.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/Jsr310DateTimeFormatAnnotationFormatterFactory.java
index 9fbcae085b..8d2698c379 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/Jsr310DateTimeFormatAnnotationFormatterFactory.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/Jsr310DateTimeFormatAnnotationFormatterFactory.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -48,6 +45,7 @@
* @author Juergen Hoeller
* @author Sam Brannen
* @author Kazuki Shimizu
+ * @author Harry Yang
* @see DateTimeFormat
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthDayFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthDayFormatter.java
index 44597c675d..4a2d388431 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthDayFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthDayFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* following JSR-310's parsing rules for a MonthDay.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see MonthDay#parse
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthFormatter.java
index e9e1307040..e424190d64 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/MonthFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* resolving a given String against the Month enum values (ignoring case).
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see Month#valueOf
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/PeriodFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/PeriodFormatter.java
index 9235d8cb73..3430e47c06 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/PeriodFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/PeriodFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* following JSR-310's parsing rules for a Period.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see Period#parse
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/TemporalAccessorPrinter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/TemporalAccessorPrinter.java
index 13f7057fa6..80621e3703 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/TemporalAccessorPrinter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/TemporalAccessorPrinter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* using a {@link DateTimeFormatter}) (the contextual one, if available).
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see DateTimeContextHolder#getFormatter
* @see DateTimeFormatter#format(TemporalAccessor)
* @since 4.0
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearFormatter.java
index 591c664334..d4a0b119f3 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* following JSR-310's parsing rules for a Year.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see Year#parse
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearMonthFormatter.java b/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearMonthFormatter.java
index b8f269dd73..8664f5c585 100644
--- a/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearMonthFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/datetime/standard/YearMonthFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.datetime.standard;
@@ -31,6 +28,7 @@
* following JSR-310's parsing rules for a YearMonth.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see YearMonth#parse
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/number/AbstractNumberFormatter.java b/today-context/src/main/java/cn/taketoday/format/number/AbstractNumberFormatter.java
index eba6489ddc..8e7d4e7f81 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/AbstractNumberFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/AbstractNumberFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number;
@@ -32,6 +29,7 @@
* providing a {@link #getNumberFormat(Locale)} template method.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @author Keith Donald
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/number/CurrencyStyleFormatter.java b/today-context/src/main/java/cn/taketoday/format/number/CurrencyStyleFormatter.java
index d375192d1b..c6640c792f 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/CurrencyStyleFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/CurrencyStyleFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number;
@@ -39,6 +36,7 @@
*
* @author Keith Donald
* @author Juergen Hoeller
+ * @author Harry Yang
* @see #setLenient
* @see #setRoundingMode
* @since 4.0
diff --git a/today-context/src/main/java/cn/taketoday/format/number/NumberFormatAnnotationFormatterFactory.java b/today-context/src/main/java/cn/taketoday/format/number/NumberFormatAnnotationFormatterFactory.java
index b593968fbe..9864b0487a 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/NumberFormatAnnotationFormatterFactory.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/NumberFormatAnnotationFormatterFactory.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number;
@@ -37,6 +34,7 @@
*
* @author Keith Donald
* @author Juergen Hoeller
+ * @author Harry Yang
* @see NumberFormat
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/number/NumberStyleFormatter.java b/today-context/src/main/java/cn/taketoday/format/number/NumberStyleFormatter.java
index d715c3d1c0..56176905bb 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/NumberStyleFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/NumberStyleFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number;
@@ -36,6 +33,7 @@
*
* @author Keith Donald
* @author Juergen Hoeller
+ * @author Harry Yang
* @see #setPattern
* @see #setLenient
* @since 4.0
diff --git a/today-context/src/main/java/cn/taketoday/format/number/PercentStyleFormatter.java b/today-context/src/main/java/cn/taketoday/format/number/PercentStyleFormatter.java
index 387958c1e3..514876ed00 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/PercentStyleFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/PercentStyleFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number;
@@ -33,6 +30,7 @@
*
* @author Keith Donald
* @author Juergen Hoeller
+ * @author Harry Yang
* @see #setLenient
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/number/money/CurrencyUnitFormatter.java b/today-context/src/main/java/cn/taketoday/format/number/money/CurrencyUnitFormatter.java
index 40f6580234..1734bdc448 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/money/CurrencyUnitFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/money/CurrencyUnitFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number.money;
@@ -32,6 +29,7 @@
* from and to currency code Strings.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @since 4.0
*/
public class CurrencyUnitFormatter implements Formatter {
diff --git a/today-context/src/main/java/cn/taketoday/format/number/money/Jsr354NumberFormatAnnotationFormatterFactory.java b/today-context/src/main/java/cn/taketoday/format/number/money/Jsr354NumberFormatAnnotationFormatterFactory.java
index 964fe5a817..92722f5ecf 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/money/Jsr354NumberFormatAnnotationFormatterFactory.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/money/Jsr354NumberFormatAnnotationFormatterFactory.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number.money;
@@ -47,6 +44,7 @@
* with Framework's common {@link NumberFormat} annotation.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see NumberFormat
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/format/number/money/MonetaryAmountFormatter.java b/today-context/src/main/java/cn/taketoday/format/number/money/MonetaryAmountFormatter.java
index f325fd78b5..0f5d7fffa5 100644
--- a/today-context/src/main/java/cn/taketoday/format/number/money/MonetaryAmountFormatter.java
+++ b/today-context/src/main/java/cn/taketoday/format/number/money/MonetaryAmountFormatter.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.format.number.money;
@@ -35,6 +32,7 @@
* and {@link javax.money.format.MonetaryAmountFormat#parse}.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see #getMonetaryAmountFormat
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/ui/ConcurrentModel.java b/today-context/src/main/java/cn/taketoday/ui/ConcurrentModel.java
index 8ff166375a..9386388105 100644
--- a/today-context/src/main/java/cn/taketoday/ui/ConcurrentModel.java
+++ b/today-context/src/main/java/cn/taketoday/ui/ConcurrentModel.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.ui;
@@ -39,6 +36,7 @@
* likely a {@code java.util.ConcurrentMap}, for a pre-determined model.
*
* @author Rossen Stoyanchev
+ * @author Harry Yang
* @since 4.0
*/
@SuppressWarnings("serial")
diff --git a/today-context/src/main/java/cn/taketoday/validation/DataBinder.java b/today-context/src/main/java/cn/taketoday/validation/DataBinder.java
index 4988fb2067..d9fe24c035 100644
--- a/today-context/src/main/java/cn/taketoday/validation/DataBinder.java
+++ b/today-context/src/main/java/cn/taketoday/validation/DataBinder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -694,7 +694,7 @@ private void assertValidators(Validator... validators) {
Object target = getTarget();
for (Validator validator : validators) {
if (validator != null && (target != null && !validator.supports(target.getClass()))) {
- throw new IllegalStateException("Invalid target for Validator [" + validator + "]: " + target);
+ throw new IllegalStateException("Invalid target for Validator [%s]: %s".formatted(validator, target));
}
}
}
diff --git a/today-context/src/main/java/cn/taketoday/validation/MapBindingResult.java b/today-context/src/main/java/cn/taketoday/validation/MapBindingResult.java
index 54d768950f..87061acbf7 100644
--- a/today-context/src/main/java/cn/taketoday/validation/MapBindingResult.java
+++ b/today-context/src/main/java/cn/taketoday/validation/MapBindingResult.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation;
@@ -36,6 +33,7 @@
* Map, for example when invoking a Validator for a Map object.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see Map
* @since 4.0
*/
diff --git a/today-context/src/main/java/cn/taketoday/validation/ObjectError.java b/today-context/src/main/java/cn/taketoday/validation/ObjectError.java
index a616e895ff..61e165130e 100644
--- a/today-context/src/main/java/cn/taketoday/validation/ObjectError.java
+++ b/today-context/src/main/java/cn/taketoday/validation/ObjectError.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © Harry Yang & 2017 - 2023 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation;
@@ -67,8 +64,7 @@ public ObjectError(String objectName, String defaultMessage) {
* @param arguments the array of arguments to be used to resolve this message
* @param defaultMessage the default message to be used to resolve this message
*/
- public ObjectError(
- String objectName, @Nullable String[] codes,
+ public ObjectError(String objectName, @Nullable String[] codes,
@Nullable Object[] arguments, @Nullable String defaultMessage) {
super(codes, arguments, defaultMessage);
diff --git a/today-context/src/main/java/cn/taketoday/validation/SimpleErrors.java b/today-context/src/main/java/cn/taketoday/validation/SimpleErrors.java
index a577976367..933e50844f 100644
--- a/today-context/src/main/java/cn/taketoday/validation/SimpleErrors.java
+++ b/today-context/src/main/java/cn/taketoday/validation/SimpleErrors.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation;
@@ -144,8 +144,7 @@ public Object getFieldValue(String field) {
return ReflectionUtils.getField(rawField, this.target);
}
- throw new IllegalArgumentException("Cannot retrieve value for field '" + field +
- "' - neither a getter method nor a raw field found");
+ throw new IllegalArgumentException("Cannot retrieve value for field '%s' - neither a getter method nor a raw field found".formatted(field));
}
@Override
diff --git a/today-context/src/main/java/cn/taketoday/validation/ValidationUtils.java b/today-context/src/main/java/cn/taketoday/validation/ValidationUtils.java
index 30a72d3d90..68a3a08bf2 100644
--- a/today-context/src/main/java/cn/taketoday/validation/ValidationUtils.java
+++ b/today-context/src/main/java/cn/taketoday/validation/ValidationUtils.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2023 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation;
@@ -36,6 +33,7 @@
*
* @author Juergen Hoeller
* @author Dmitriy Kopylenko
+ * @author Harry Yang
* @see Validator
* @see Errors
* @since 4.0
@@ -83,7 +81,7 @@ public static void invokeValidator(Validator validator,
}
if (!validator.supports(target.getClass())) {
throw new IllegalArgumentException(
- "Validator [" + validator.getClass() + "] does not support [" + target.getClass() + "]");
+ "Validator [%s] does not support [%s]".formatted(validator.getClass(), target.getClass()));
}
if (ObjectUtils.isNotEmpty(validationHints) && validator instanceof SmartValidator) {
@@ -256,9 +254,8 @@ public static void rejectIfEmptyOrWhitespace(
* (can be {@code null})
* @param defaultMessage fallback default message
*/
- public static void rejectIfEmptyOrWhitespace(
- Errors errors, String field, String errorCode,
- @Nullable Object[] errorArgs, @Nullable String defaultMessage) {
+ public static void rejectIfEmptyOrWhitespace(Errors errors, String field,
+ String errorCode, @Nullable Object[] errorArgs, @Nullable String defaultMessage) {
Assert.notNull(errors, "Errors object is required");
Object value = errors.getFieldValue(field);
diff --git a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessor.java b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessor.java
index 8abaf2e9af..7fda5dee04 100644
--- a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessor.java
+++ b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 - 2023 the original author or authors.
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation.beanvalidation;
@@ -97,8 +97,8 @@ public static BeanRegistrationAotContribution processAheadOfTime(RegisteredBean
}
catch (RuntimeException ex) {
if (ex instanceof TypeNotPresentException) {
- logger.debug("Skipping validation constraint hint inference for bean " +
- registeredBean.getBeanName() + " due to a TypeNotPresentException at validator level: " + ex.getMessage());
+ logger.debug("Skipping validation constraint hint inference for bean %s due to a TypeNotPresentException at validator level: %s"
+ .formatted(registeredBean.getBeanName(), ex.getMessage()));
}
else {
logger.warn("Skipping validation constraint hint inference for bean " +
diff --git a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationPostProcessor.java b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationPostProcessor.java
index 323aec6583..7fbbad1c0c 100644
--- a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationPostProcessor.java
+++ b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/BeanValidationPostProcessor.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation.beanvalidation;
@@ -41,7 +38,8 @@
* constraint violations right before calling the bean's init method (if any).
*
* @author Juergen Hoeller
- * @since 4.0
+ * @author Harry Yang
+ * @since 4.0s
*/
public class BeanValidationPostProcessor implements InitializationBeanPostProcessor, InitializingBean {
diff --git a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/ContextConstraintValidatorFactory.java b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/ContextConstraintValidatorFactory.java
index f1b689f68c..39affa9a0b 100644
--- a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/ContextConstraintValidatorFactory.java
+++ b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/ContextConstraintValidatorFactory.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation.beanvalidation;
@@ -30,6 +27,7 @@
* Framework BeanFactory for creating autowired {@link ConstraintValidator} instances.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see AutowireCapableBeanFactory#createBean(Class)
* @see cn.taketoday.context.ApplicationContext#getAutowireCapableBeanFactory()
* @since 4.0
diff --git a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/CustomValidatorBean.java b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/CustomValidatorBean.java
index 1b6555e8f7..c44f42a61b 100644
--- a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/CustomValidatorBean.java
+++ b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/CustomValidatorBean.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation.beanvalidation;
@@ -35,6 +32,7 @@
* {@link cn.taketoday.validation.Validator} interface.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @since 4.0
*/
public class CustomValidatorBean extends InfraValidatorAdapter implements Validator, InitializingBean {
diff --git a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/LocalValidatorFactoryBean.java b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/LocalValidatorFactoryBean.java
index 97d6107a9b..62c4d7bfed 100644
--- a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/LocalValidatorFactoryBean.java
+++ b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/LocalValidatorFactoryBean.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © Harry Yang & 2017 - 2023 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation.beanvalidation;
@@ -77,6 +74,7 @@
* {@code jakarta.validation} API being present but no explicit Validator having been configured.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see ValidatorFactory
* @see Validator
* @see Validation#buildDefaultValidatorFactory()
diff --git a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/MessageSourceResourceBundleLocator.java b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/MessageSourceResourceBundleLocator.java
index a13bf00b05..f43c76c4a5 100644
--- a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/MessageSourceResourceBundleLocator.java
+++ b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/MessageSourceResourceBundleLocator.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation.beanvalidation;
@@ -34,6 +31,7 @@
* exposing a Framework {@link MessageSource} as localized {@link MessageSourceResourceBundle}.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @see ResourceBundleLocator
* @see MessageSource
* @see MessageSourceResourceBundle
diff --git a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/OptionalValidatorFactoryBean.java b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/OptionalValidatorFactoryBean.java
index 45534380e4..23b02b293b 100644
--- a/today-context/src/main/java/cn/taketoday/validation/beanvalidation/OptionalValidatorFactoryBean.java
+++ b/today-context/src/main/java/cn/taketoday/validation/beanvalidation/OptionalValidatorFactoryBean.java
@@ -1,8 +1,5 @@
/*
- * Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
- * Copyright © TODAY & 2017 - 2022 All Rights Reserved.
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
+ * Copyright 2017 - 2024 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see [http://www.gnu.org/licenses/]
+ * along with this program. If not, see [https://www.gnu.org/licenses/]
*/
package cn.taketoday.validation.beanvalidation;
@@ -33,6 +30,7 @@
* Validator having been configured.
*
* @author Juergen Hoeller
+ * @author Harry Yang
* @since 4.0
*/
public class OptionalValidatorFactoryBean extends LocalValidatorFactoryBean {