diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
index 93a5e75f0e..d1dfa2dd37 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
@@ -116,7 +116,7 @@ public class CronSequenceGenerator {
/*
The plan:
- 1 Round up to the next whole second
+ 1 Start with whole second (rounding up if necessary)
2 If seconds match move on, otherwise find the next match:
2.1 If next match is in the next minute then roll forwards
@@ -128,8 +128,6 @@ public class CronSequenceGenerator {
4 If hour matches move on, otherwise find the next match
4.1 If next match is in the next day then roll forwards,
4.2 Reset the minutes and seconds and go to 2
-
- ...
*/
Calendar calendar = new GregorianCalendar();
@@ -428,7 +426,7 @@ public class CronSequenceGenerator {
@Override
public String toString() {
- return (getClass().getSimpleName() + ": " + this.expression);
+ return getClass().getSimpleName() + ": " + this.expression;
}
}
diff --git a/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java
index 808df1adea..159e0aa108 100644
--- a/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java
+++ b/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java
@@ -35,17 +35,17 @@ import org.springframework.util.xml.DomUtils;
/**
* BeanDefinitionParser implementation for the '{@code
The script for each object can be specified either as a reference to the Resource - * containing it (using the '{@code script-source}' attribute) or inline in the XML configuration - * itself (using the '{@code inline-script}' attribute. + *
The script for each object can be specified either as a reference to the + * resource containing it (using the '{@code script-source}' attribute) or inline + * in the XML configuration itself (using the '{@code inline-script}' attribute. * - *
By default, dynamic objects created with these tags are not refreshable. - * To enable refreshing, specify the refresh check delay for each object (in milliseconds) using the - * '{@code refresh-check-delay}' attribute. + *
By default, dynamic objects created with these tags are not + * refreshable. To enable refreshing, specify the refresh check delay for each + * object (in milliseconds) using the '{@code refresh-check-delay}' attribute. * * @author Rob Harrop * @author Rod Johnson @@ -170,14 +170,13 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser { // Attach any refresh metadata. String refreshCheckDelay = element.getAttribute(REFRESH_CHECK_DELAY_ATTRIBUTE); if (StringUtils.hasText(refreshCheckDelay)) { - bd.setAttribute(ScriptFactoryPostProcessor.REFRESH_CHECK_DELAY_ATTRIBUTE, new Long(refreshCheckDelay)); + bd.setAttribute(ScriptFactoryPostProcessor.REFRESH_CHECK_DELAY_ATTRIBUTE, Long.valueOf(refreshCheckDelay)); } // Attach any proxy target class metadata. String proxyTargetClass = element.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE); if (StringUtils.hasText(proxyTargetClass)) { - Boolean flag = new Boolean(proxyTargetClass); - bd.setAttribute(ScriptFactoryPostProcessor.PROXY_TARGET_CLASS_ATTRIBUTE, flag); + bd.setAttribute(ScriptFactoryPostProcessor.PROXY_TARGET_CLASS_ATTRIBUTE, Boolean.valueOf(proxyTargetClass)); } // Add constructor arguments.