Affects: 5.2.8.RELEASE There is a small bug in the class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport in the method :

public void setAwaitTerminationSeconds(int awaitTerminationSeconds) {
        this.awaitTerminationMillis = awaitTerminationSeconds * 1000;
}

When the input parameter awaitTerminationSeconds is bigger then Integer.MAX_VALUE/1000 the value asigned to long this.awaitTerminationMillis can even be negative !

I recommend changing the 1000 to the 1000l long version as below

public void setAwaitTerminationSeconds(int awaitTerminationSeconds) {
        this.awaitTerminationMillis = awaitTerminationSeconds * 1000l;
}

Comment From: jhoeller

Thanks for spotting this! It may be rare to specify such a large value there but it still needs to work correctly.

This also applies to AbstractResourceBasedMessageSource.setCacheSeconds where I'll fix it the same way.