Skip to content

Commit

Permalink
IM-463 Consistent check for null
Browse files Browse the repository at this point in the history
* The previous code was doing a null check after passing it to an array
builder
  • Loading branch information
iperdomo committed Oct 10, 2024
1 parent 6714b96 commit 2e4b0ee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ public long defineDimensions(long... extents) {
}

public long defineDimensions(List<Long> extents) {
this.extents = Utils.Numbers.longArrayFromCollection(extents);
dimensions = extents == null ? 0 : extents.size();
this.dimensions = extents == null ? 0 : extents.size();
this.extents = extents == null? new long[0] : Utils.Numbers.longArrayFromCollection(extents);
return initializeStrides();
}

Expand Down

0 comments on commit 2e4b0ee

Please sign in to comment.