Skip to content

Commit c7dde7b

Browse files
committed
Remove deprecated toObjectArray()
1 parent f99baaa commit c7dde7b

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
* add `toCharArray()` method which decodes internal byte array to char[] #27
77
* add `encodeBase64()` supporting padding-less encoding
88

9+
### Breaking
10+
11+
* removed deprecated `toObjectArray()`; use `toBoxedArray()` instead
12+
913
## v0.8.0
1014

1115
* add radix encoding/parsing and fix radix tests #6, #20

src/main/java/at/favre/lib/bytes/Bytes.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,19 +1733,12 @@ public List<Byte> toList() {
17331733
return Util.toList(internalArray());
17341734
}
17351735

1736-
/**
1737-
* @return see {@link #toBoxedArray()}
1738-
* @deprecated renamed API, use {@link #toBoxedArray()} instead - will be removed in v1.0+
1739-
*/
1740-
@Deprecated
1741-
public Byte[] toObjectArray() {
1742-
return toBoxedArray();
1743-
}
1744-
17451736
/**
17461737
* Returns a copy of the internal byte-array as boxed primitive array.
17471738
* This requires a time and space complexity of O(n).
17481739
*
1740+
* Note: this method was previously called <code>toObjectArray()</code>
1741+
*
17491742
* @return copy of internal array as object array
17501743
*/
17511744
public Byte[] toBoxedArray() {

src/test/java/at/favre/lib/bytes/BytesToConvertOtherTypesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private void checkArray(byte[] array) {
4545
for (int i = 0; i < array.length; i++) {
4646
assertEquals(byteArray[i], Byte.valueOf(array[i]));
4747
}
48-
assertArrayEquals(byteArray, Bytes.from(array).toObjectArray());
48+
assertArrayEquals(byteArray, Bytes.from(array).toBoxedArray());
4949
}
5050

5151
@Test

0 commit comments

Comments
 (0)