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

problem with 'Avoid Hiding Cause of the Exception': if exception passed as not last parameter to c-tor #52

Closed
romani opened this Issue Sep 20, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@romani
Member

romani commented Sep 20, 2012

Code:

@override
public Object convertToObject(String newString, Object previousValue)
throws DataTypeConversionException {
if (BigDecimal.class.equals(type)) { // fix for #279
DecimalFormat format = (DecimalFormat) NumberFormat.getNumberInstance(getLocale());
format.setParseBigDecimal(true);
try {
return format.parse(newString);
} catch (ParseException e) {
ErrorObject errorCode = new ErrorObject(ErrorCodes.ERROR_CODE_BAD_FORMAT, newString);
throw new DataTypeConversionException("Could not be converted to BigDecimal", e, errorCode); //// INCORRECT WARNING HERE!!
}
}
return convertType(super.convertToObject(newString, previousValue));
}

Please update Uts as support this case.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 5, 2012

Member

Issue is assigned to Ilja Dubinin (https://github.com/sabaka).

Member

romani commented Oct 5, 2012

Issue is assigned to Ilja Dubinin (https://github.com/sabaka).

@ghost ghost assigned sabaka Oct 7, 2012

sabaka pushed a commit to sabaka/sevntu.checkstyle that referenced this issue Mar 2, 2013

sabaka pushed a commit to sabaka/sevntu.checkstyle that referenced this issue Mar 8, 2013

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Mar 11, 2013

Member

fixed

Member

romani commented Mar 11, 2013

fixed

@romani romani closed this Mar 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment