Skip to content

(bs/to-byte-array []) fails #19

Open
@martinraison

Description

@martinraison

Is this by design? I would expect to get an empty byte array instead.

=> (bs/to-byte-array [])
IllegalArgumentException Don't know how to convert class clojure.lang.PersistentVector into class [B byte-streams/convert (byte_streams.clj:187)

Since (bs/to-byte-array [(byte-array [2 3 4]) (byte-array [5 6])]) works, the behavior seems surprising to me. It requires checking that the array is not empty before calling to-byte-array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions