Skip to content

Commit

Permalink
Merge pull request #8783 from babsingh/fix_varhandles_coortypes
Browse files Browse the repository at this point in the history
Fix VarHandle coordinateTypes
  • Loading branch information
DanHeidinga committed Mar 9, 2020
2 parents 8b48c8d + 34ef5d0 commit 4156b55
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,19 @@ MethodType accessModeType(Class<?> receiver, Class<?> type, Class<?>... args) {
}

this.fieldType = setter.parameterType(setter.parameterCount() - 1);
this.coordinateTypes = getter.parameterArray();

/* The first VarHandle parameter type should be removed from the getter in order to derive
* the coordinate types.
*/
Class<?>[] getterParams = getter.parameterArray();
this.coordinateTypes = Arrays.copyOfRange(getterParams, 1, getterParams.length);

if (operationMTsExact != null) {
this.handleTable = populateMHsJEP370(operationsClass, operationMTs, operationMTsExact);
} else {
this.handleTable = populateMHsJEP370(operationsClass, operationMTs, operationMTs);
}

this.modifiers = 0;
this.varFormUsed = true;
}
Expand Down

0 comments on commit 4156b55

Please sign in to comment.