Skip to content

Commit f7e0486

Browse files
committed
Chain allocate() with empty() constructor
1 parent 706ea5f commit f7e0486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static Bytes allocate(int length) {
9898
* @return new instance
9999
*/
100100
public static Bytes allocate(int length, byte defaultValue) {
101-
if (length == 0) return EMPTY;
101+
if (length == 0) return empty();
102102
byte[] array = new byte[length];
103103
if (defaultValue != 0) {
104104
Arrays.fill(array, defaultValue);

0 commit comments

Comments
 (0)