Bugs item #1455515, was opened at 2006-03-21 11:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1455515&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Berman (atberman)
Assigned to: Nobody/Anonymous (nobody)
Summary: NullPointerException in AbstractValidator

Initial Comment:
There are no tests for null in the AbstractValidator. 
If you use the method:

public void error(final FormComponent formComponent,
final String resourceKey,
                        final IModel resourceModel)
        {

                final List keys = new ArrayList(2);
                keys.add(resourceKey);

                final String defaultKey = Classes.simpleName(getClass());
                if (!keys.contains(defaultKey))
                {
                        keys.add(defaultKey);
                }

                Map map = (Map)resourceModel.getObject(formComponent);

                formComponent.error(keys, map);
        }

If you do not have a resourceModel because you don't
need any variable interpolation and you pass a null
instead, you get an NPE at line Map map =
(Map)resourceModel.getObject(formComponent);  Also, the
code assumes the resourceModel is a Map which is
incorrect as well.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1455515&group_id=119783


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to