Fix tuple#toArray implementations

This commit is contained in:
broccolai 2021-01-28 09:41:17 +00:00 committed by Jason
parent 213039fc20
commit a6eb44376c
4 changed files with 12 additions and 9 deletions

View file

@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated ### Deprecated
- Deprecated old JDA UserParser that did not take an isolation parameter - Deprecated old JDA UserParser that did not take an isolation parameter
### Fixed
- Tuple implementations now do not throw an error when using the toArray method
## [1.4.0] - 2021-01-16 ## [1.4.0] - 2021-01-16

View file

@ -147,8 +147,8 @@ public class Quartet<U, V, W, X> implements Tuple {
final Object[] array = new Object[4]; final Object[] array = new Object[4];
array[0] = this.first; array[0] = this.first;
array[1] = this.second; array[1] = this.second;
array[3] = this.third; array[2] = this.third;
array[4] = this.fourth; array[3] = this.fourth;
return array; return array;
} }

View file

@ -164,9 +164,9 @@ public class Quintet<U, V, W, X, Y> implements Tuple {
final Object[] array = new Object[5]; final Object[] array = new Object[5];
array[0] = this.first; array[0] = this.first;
array[1] = this.second; array[1] = this.second;
array[3] = this.third; array[2] = this.third;
array[4] = this.fourth; array[3] = this.fourth;
array[5] = this.fifth; array[4] = this.fifth;
return array; return array;
} }

View file

@ -183,10 +183,10 @@ public class Sextet<U, V, W, X, Y, Z> implements Tuple {
final Object[] array = new Object[6]; final Object[] array = new Object[6];
array[0] = this.first; array[0] = this.first;
array[1] = this.second; array[1] = this.second;
array[3] = this.third; array[2] = this.third;
array[4] = this.fourth; array[3] = this.fourth;
array[5] = this.fifth; array[4] = this.fifth;
array[6] = this.sixth; array[5] = this.sixth;
return array; return array;
} }