Skip to content

Commit

Permalink
Correct bound-check.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Sep 20, 2020
1 parent 4c235f0 commit 0e8e61e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,7 @@ public TargetHandler make(Implementation.Target implementationTarget) {
* {@inheritDoc}
*/
public TargetHandler.Resolved resolve(MethodDescription instrumentedMethod) {
if (instrumentedMethod.getParameters().size() < index) {
if (index >= instrumentedMethod.getParameters().size()) {
throw new IllegalArgumentException(instrumentedMethod + " does not have a parameter with index " + index);
}
return new Resolved(instrumentedMethod.getParameters().get(index));
Expand Down

0 comments on commit 0e8e61e

Please sign in to comment.