[jboss-jira] [JBoss JIRA] Closed: (JBMICROCONT-140) Configurator should check that fields/methods exist before trying to use them

Ales Justin (JIRA) jira-events at lists.jboss.org
Fri Jul 6 08:16:53 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBMICROCONT-140?page=all ]

Ales Justin closed JBMICROCONT-140.
-----------------------------------

    Resolution: Done

Checked and added as much as possible.

> Configurator should check that fields/methods exist before trying to use them
> -----------------------------------------------------------------------------
>
>                 Key: JBMICROCONT-140
>                 URL: http://jira.jboss.com/jira/browse/JBMICROCONT-140
>             Project: JBoss MicroContainer
>          Issue Type: Bug
>          Components: Configurator
>    Affects Versions: JBossMC_2_0_0 Beta
>            Reporter: Adrian Brock
>         Assigned To: Ales Justin
>             Fix For: JBossMC_2_0_0_CR1
>
>
> Make sure the configurator is throwing reasonable error messages (not NPE)
> when things are null.
> e.g. the following method needs to check for null method info meaning there is no getter
>    public static TargettedJoinpoint getPropertyGetterJoinPoint(boolean trace, PropertyInfo info) throws Throwable
>    {
>       if (trace)
>          log.trace("Get property setter join point info=" + info);
>       if (info == null)
>          throw new IllegalArgumentException("Null property info");
>       JoinpointFactory jpf = info.getBeanInfo().getJoinpointFactory();
>       MethodInfo minfo = info.getGetter();
> +      if (minfo == null)
> +         throw new IllegalArgumentException("Property is write only");
>        return getMethodJoinpoint(null, jpf, minfo.getName(), null, null);
>    }

-- 
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

        



More information about the jboss-jira mailing list