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

Code Quality Improvement - Exception handlers should preserve the original exception #1033

Merged
merged 1 commit into from
Dec 4, 2015
Merged

Code Quality Improvement - Exception handlers should preserve the original exception #1033

merged 1 commit into from
Dec 4, 2015

Conversation

civanyp
Copy link
Contributor

@civanyp civanyp commented Dec 3, 2015

This pull request is focused on resolving occurrences of Sonar rule squid:S1166 - “Exception handlers should preserve the original exception”. You can find more information about the issue here: https://dev.eclipse.org/sonar/rules/show/squid:S1166

Please let me know if you have any questions.

Christian

@civanyp
Copy link
Contributor Author

civanyp commented Dec 4, 2015

Hi Rodrigo,

I see the issue comes from case when br.com.caelum.vraptor.core.DefaultConverters#classes doesn't clean properly between sequential tests. So CDIBasedContainerTest.setup() method may occasional fails.

Cheers

errors.add(ex.getValidationMessage().withCategory(target.getName()));
} catch (IllegalStateException e) {
logger.warn("An error occured while getting validation message", e);
Copy link
Member

Choose a reason for hiding this comment

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

i'd use logger#debug in both cases... what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, I'll change it to logger.debug

@Turini
Copy link
Member

Turini commented Dec 4, 2015

Amazing PR, @civanyp! Thank you for doing this

…ginal exception

Update

Code Quality Improvement -  Update with logger.debug
@civanyp
Copy link
Contributor Author

civanyp commented Dec 4, 2015

Updated logger.debug!

Turini added a commit that referenced this pull request Dec 4, 2015
…hould-preserve-the-original-exception-fix-1

Code Quality Improvement - Exception handlers should preserve the original exception
@Turini Turini merged commit 27afc6b into caelum:master Dec 4, 2015
@Turini
Copy link
Member

Turini commented Dec 4, 2015

amazing! thank you again, @civanyp

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