Skip to content

ArrayList converts bytes to str #612

Description

@wensheng
from jnius import autoclass

ArrayList = autoclass("java.util.ArrayList")

md = ArrayList()
md.add(b'hello')
md.add(b'world')

print(type(md.get(0)))  # should be bytes, but is str
print(md.get(0))  # should be b'hello', but is 'hello'

Added bytes to ArrayList, but got str back.

Is it possible to get it fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions