Skip to content

Catch encoding exception - #464

Closed
rsafonseca wants to merge 2 commits into
apache:masterfrom
rsafonseca:findbugs75
Closed

rsafonseca wants to merge 2 commits into
apache:masterfrom
rsafonseca:findbugs75

Conversation

@rsafonseca

Copy link
Copy Markdown
Contributor

No description provided.

@asfbot

asfbot commented Jun 16, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #462 FAILURE
Looks like there's a problem with this pull request

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change to: "Unable to generate UUID due to unexpected encoding error: " + e.getLocalizedMessage()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and probably retry with Charset.defaultCharset(), no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland
I changed to localized message as requested.
I don't expect this exception to ever be thrown, because it will only do so if the undelying platform really doesn't support UTF-8 at all. Can't think of a platform that wouldn't support that nowadays, wether it's the default or not.
Adding a retry within the catch would require another catch within it, so i think its too much for an exception that would likely never be thrown ;)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right.. getBytes(Charset) doesn't require a try/catch since if you can retrieve the Charset object it will always be supported.
I see you have already fixed it, thanks Daan :)

Change output to localized message
@asfgit asfgit closed this in 0851e4e Jun 16, 2015
@asfbot

asfbot commented Jun 16, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #463 FAILURE
Looks like there's a problem with this pull request

kishankavala pushed a commit to kishankavala/cloudstack that referenced this pull request Jun 25, 2015
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes apache#464
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.

3 participants