Skip to content

Commit

Permalink
accept strings and convert to byte[] in ByteArraySchema
Browse files Browse the repository at this point in the history
  • Loading branch information
gracekarina authored and frantuma committed Mar 23, 2022
1 parent 1d6b12a commit 0d21afc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ protected byte[] cast(Object value) {
try {
if (value instanceof byte[]) {
return (byte[]) value;
} else {
return value.toString().getBytes();
}
} catch (Exception e) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ protected byte[] cast(Object value) {
try {
if (value instanceof byte[]) {
return (byte[]) value;
} else {
return value.toString().getBytes();
}
} catch (Exception e) {
}
Expand Down

0 comments on commit 0d21afc

Please sign in to comment.