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

Remove unnecessary IOExceptions #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ptaoussanis
Copy link
Owner

Ref. addthis#34

cykl added 5 commits May 28, 2013 22:45
By using a ByteBuffer instead of a ByteArrayOutputStream we can get ride
of cumbersome IOException. We also get an extra boost for free. Running
TestHyperLogLog.testSerialization in a caliper micro-benchmark shows that
the ByteBuffer version is two times faster.
By using a ByteBuffer instead of a ByteArrayOutputStream we can get ride
of cumbersome IOException. We also get an extra boost for free.
We can safely try/catch exceptions in ExternalizableUtil since ByteArrayOutputStream
never throws IOException.
All implementations have been cleaned. Their is no reason for a serializer to
throw IOException and users don't want to criple their code with unecessary
exception handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants