gnodet commented on issue #12595:
URL: https://github.com/apache/maven/issues/12595#issuecomment-5457535236
Closing as invalid after investigation.
The `SubList.get()` method at line 300 of `ImmutableCollections.java`
already uses the correct bounds check:
```java
if (index < 0 || index >= size()) {
```
The condition uses `>=` (not `>` as claimed in the report). When `index ==
size()`, the condition correctly evaluates to `true` and throws
`IndexOutOfBoundsException`. This is the standard bounds check used by
`java.util.ArrayList` and other JDK collections. There is no off-by-one error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]