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

FilterDelay given as "integer" causes NullPointerException #318

Open
klopc opened this issue Feb 2, 2017 · 0 comments
Open

FilterDelay given as "integer" causes NullPointerException #318

klopc opened this issue Feb 2, 2017 · 0 comments

Comments

@klopc
Copy link

klopc commented Feb 2, 2017

Using dt:filterDelay="10000" will cause a NullPointerException in TableFilterDelayAttrProcessor as it will try to cast the given value, an int, into a BigDecimal.

(from AttributeUtils.processStandardExpression at :
return result == null?null:(clazz.isAssignableFrom(result.getClass())?result:null);

Workaround is to use : dt:filterDelay="10000.0" which will work correctly, but is unintuitive and does not correspond to the documentation.

An easy fix would be to replace line 28 of TableFilterDelayAttrProcessor :
BigDecimal attrValue = (BigDecimal)AttributeUtils.parseAttribute(arguments, element, attributeName, BigDecimal.class);

with :
BigInteger attrValue = (BigInteger)AttributeUtils.parseAttribute(arguments, element, attributeName, BigInteger.class);

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

No branches or pull requests

1 participant