1504 |
|
* |
1505 |
|
* @param corePoolSize the new core size |
1506 |
|
* @throws IllegalArgumentException if {@code corePoolSize < 0} |
1507 |
+ |
* or {@code corePoolSize} is greater than the {@linkplain |
1508 |
+ |
* #getMaximumPoolSize() maximum pool size} |
1509 |
|
* @see #getCorePoolSize |
1510 |
|
*/ |
1511 |
|
public void setCorePoolSize(int corePoolSize) { |
1512 |
< |
if (corePoolSize < 0) |
1512 |
> |
if (corePoolSize < 0 || maximumPoolSize < corePoolSize) |
1513 |
|
throw new IllegalArgumentException(); |
1514 |
|
int delta = corePoolSize - this.corePoolSize; |
1515 |
|
this.corePoolSize = corePoolSize; |