Merge pull request #801 from echatman/patch-1
* patch-1: Fix number parsing of @Scheduled attributes
This commit is contained in:
commit
01d1e71d66
|
|
@ -75,6 +75,7 @@ import org.springframework.util.StringValueResolver;
|
||||||
* @author Mark Fisher
|
* @author Mark Fisher
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @author Chris Beams
|
* @author Chris Beams
|
||||||
|
* @author Elizabeth Chatman
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see Scheduled
|
* @see Scheduled
|
||||||
* @see EnableScheduling
|
* @see EnableScheduling
|
||||||
|
|
@ -295,7 +296,7 @@ public class ScheduledAnnotationBeanPostProcessor implements BeanPostProcessor,
|
||||||
initialDelayString = this.embeddedValueResolver.resolveStringValue(initialDelayString);
|
initialDelayString = this.embeddedValueResolver.resolveStringValue(initialDelayString);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
initialDelay = Integer.parseInt(initialDelayString);
|
initialDelay = Long.parseLong(initialDelayString);
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ex) {
|
catch (NumberFormatException ex) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
|
|
@ -343,7 +344,7 @@ public class ScheduledAnnotationBeanPostProcessor implements BeanPostProcessor,
|
||||||
fixedDelayString = this.embeddedValueResolver.resolveStringValue(fixedDelayString);
|
fixedDelayString = this.embeddedValueResolver.resolveStringValue(fixedDelayString);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
fixedDelay = Integer.parseInt(fixedDelayString);
|
fixedDelay = Long.parseLong(fixedDelayString);
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ex) {
|
catch (NumberFormatException ex) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
|
|
@ -367,7 +368,7 @@ public class ScheduledAnnotationBeanPostProcessor implements BeanPostProcessor,
|
||||||
fixedRateString = this.embeddedValueResolver.resolveStringValue(fixedRateString);
|
fixedRateString = this.embeddedValueResolver.resolveStringValue(fixedRateString);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
fixedRate = Integer.parseInt(fixedRateString);
|
fixedRate = Long.parseLong(fixedRateString);
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ex) {
|
catch (NumberFormatException ex) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue