You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Steve Ulrich (JIRA)" <ji...@apache.org> on 2009/03/17 14:08:50 UTC
[jira] Updated: (DIRMINA-676) ObjectMBean throws
NullPointerException when accessing non-existing attributes
[ https://issues.apache.org/jira/browse/DIRMINA-676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ulrich updated DIRMINA-676:
---------------------------------
Attachment: ObjectMBean.java.patch
Patch (relative to integration-jmx project) added.
> ObjectMBean throws NullPointerException when accessing non-existing attributes
> ------------------------------------------------------------------------------
>
> Key: DIRMINA-676
> URL: https://issues.apache.org/jira/browse/DIRMINA-676
> Project: MINA
> Issue Type: Bug
> Components: Integration
> Affects Versions: 2.0.0-M4
> Reporter: Steve Ulrich
> Assignee: Ashish Paliwal
> Priority: Trivial
> Attachments: ObjectMBean.java.patch
>
>
> Currently when someone tries to access an attribute via JMX that doesn't exist, the ObjectMBean throws a NullPointerException.
> It would be better to precheck if the attribute exists and throw an AttributeNotFoundException with a short info, like "Attribute <XYZ> doesn't not exist".
> Stacktrace:
> java.lang.NullPointerException
> at org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:168)
> at MyTestClass.main(MyTestClass.java:12)
> Exception in thread "main" javax.management.MBeanException
> at org.apache.mina.integration.jmx.ObjectMBean.throwMBeanException(ObjectMBean.java:849)
> at org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:173)
> at MyTestClass.main(MyTestClass.java:12)
> Caused by: java.lang.NullPointerException
> at org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:168)
> ... 1 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.