[
http://jira.jboss.com/jira/browse/JBSEAM-2747?page=comments#action_12403269 ]
William Woodman commented on JBSEAM-2747:
-----------------------------------------
The view from the quick posting is that this was an error message - and it should be more
specific about using it when maxResults has been set.
however my conjecture is that the fix i proposed worked whether you did or did not set the
max results - and could freely move from one to the other with no error message required.
This was done by working through the logic a bit more carefully and thinking about what
you'd expect to happen in either scenario model ( what would happen if maxResults was
set - but then cleared, or if null to begin with and then set later.)
The fix (in raw form ) worked for all scenarios in the list browser and let me switch
freely between either approach without breaking the code - or requiring error handling
from the user.
generally however - its easy in the current code to get a null pointer exception and this
requires fixing regardless of approach you finally take to the solution (reporting an
error in use to the user - or just handling the logic seamlessly)
Improve the error message when using a paged version of EntityQuery
without defining a value for the maxResults property
------------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-2747
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2747
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.1.0.A1, 2.0.1.GA
Reporter: Fernando MontaƱo
Fix For: 2.0.2.GA, 2.1.0.GA
When someone tries to use a paged version of EntityQuery (e.g. invoking isNextExists()
from xhtml) without defining a value for the maxResults property, one gets a
NullPointerException. It would be better to have a nicest error message instead a NPE.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira