Skip to content

Commit

Permalink
fix: fix byte array class name (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
killagu authored and gxcsoccer committed Nov 21, 2018
1 parent 98a2362 commit 40c9467
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const arrayTypeMap = {
double: 'D',
long: 'J',
float: 'F',
byte: 'B',
string: 'Ljava.lang.String;',
object: 'Ljava.lang.Object;',
};
Expand Down
5 changes: 5 additions & 0 deletions test/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ describe('test/utils.test.js', () => {
isArray: true,
arrayDepth: 2,
}) === '[[Ljava.lang.String;');
assert(utils.getJavaClassname({
$class: 'byte',
$: Buffer.from('A'),
isArray: true,
}) === '[B');
});

it('should flatCopyTo ok', () => {
Expand Down

0 comments on commit 40c9467

Please sign in to comment.