Skip to content

Commit a1b167a

Browse files
committed
Polishing
1 parent 433764d commit a1b167a

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public Date next(Date date) {
116116
/*
117117
The plan:
118118
119-
1 Round up to the next whole second
119+
1 Start with whole second (rounding up if necessary)
120120
121121
2 If seconds match move on, otherwise find the next match:
122122
2.1 If next match is in the next minute then roll forwards
@@ -128,8 +128,6 @@ public Date next(Date date) {
128128
4 If hour matches move on, otherwise find the next match
129129
4.1 If next match is in the next day then roll forwards,
130130
4.2 Reset the minutes and seconds and go to 2
131-
132-
...
133131
*/
134132

135133
Calendar calendar = new GregorianCalendar();
@@ -428,7 +426,7 @@ public int hashCode() {
428426

429427
@Override
430428
public String toString() {
431-
return (getClass().getSimpleName() + ": " + this.expression);
429+
return getClass().getSimpleName() + ": " + this.expression;
432430
}
433431

434432
}

spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@
3535

3636
/**
3737
* BeanDefinitionParser implementation for the '{@code <lang:groovy/>}',
38-
* '{@code <lang:jruby/>}' and '{@code <lang:bsh/>}' tags.
38+
* '{@code <lang:std/>}' and '{@code <lang:bsh/>}' tags.
3939
* Allows for objects written using dynamic languages to be easily exposed with
4040
* the {@link org.springframework.beans.factory.BeanFactory}.
4141
*
42-
* <p>The script for each object can be specified either as a reference to the Resource
43-
* containing it (using the '{@code script-source}' attribute) or inline in the XML configuration
44-
* itself (using the '{@code inline-script}' attribute.
42+
* <p>The script for each object can be specified either as a reference to the
43+
* resource containing it (using the '{@code script-source}' attribute) or inline
44+
* in the XML configuration itself (using the '{@code inline-script}' attribute.
4545
*
46-
* <p>By default, dynamic objects created with these tags are <strong>not</strong> refreshable.
47-
* To enable refreshing, specify the refresh check delay for each object (in milliseconds) using the
48-
* '{@code refresh-check-delay}' attribute.
46+
* <p>By default, dynamic objects created with these tags are <strong>not</strong>
47+
* refreshable. To enable refreshing, specify the refresh check delay for each
48+
* object (in milliseconds) using the '{@code refresh-check-delay}' attribute.
4949
*
5050
* @author Rob Harrop
5151
* @author Rod Johnson
@@ -170,14 +170,13 @@ else if (beanDefinitionDefaults.getDestroyMethodName() != null) {
170170
// Attach any refresh metadata.
171171
String refreshCheckDelay = element.getAttribute(REFRESH_CHECK_DELAY_ATTRIBUTE);
172172
if (StringUtils.hasText(refreshCheckDelay)) {
173-
bd.setAttribute(ScriptFactoryPostProcessor.REFRESH_CHECK_DELAY_ATTRIBUTE, new Long(refreshCheckDelay));
173+
bd.setAttribute(ScriptFactoryPostProcessor.REFRESH_CHECK_DELAY_ATTRIBUTE, Long.valueOf(refreshCheckDelay));
174174
}
175175

176176
// Attach any proxy target class metadata.
177177
String proxyTargetClass = element.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE);
178178
if (StringUtils.hasText(proxyTargetClass)) {
179-
Boolean flag = new Boolean(proxyTargetClass);
180-
bd.setAttribute(ScriptFactoryPostProcessor.PROXY_TARGET_CLASS_ATTRIBUTE, flag);
179+
bd.setAttribute(ScriptFactoryPostProcessor.PROXY_TARGET_CLASS_ATTRIBUTE, Boolean.valueOf(proxyTargetClass));
181180
}
182181

183182
// Add constructor arguments.

0 commit comments

Comments
 (0)