Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should use CharsetDecoder rather than new String(bytes, UTF_8) #2

Closed
fmcarvalho opened this issue May 13, 2019 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@fmcarvalho
Copy link
Contributor

Bad use here: https://github.com/javasync/AsyncFileRw/blob/master/src/main/java/org/javaync/io/AsyncFileReader.java#L81

We cannot assume that we have a valid number of bytes: res.append(new String(bytes, UTF_8));

This can be wrong: new String(bytes, UTF_8)

@fmcarvalho fmcarvalho added the bug Something isn't working label May 13, 2019
@fmcarvalho fmcarvalho changed the title Use CharsetDecoder Should use CharsetDecoder rather than new String(bytes, UTF_8) May 13, 2019
@fmcarvalho
Copy link
Contributor Author

Solve on Release 1.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant