Skip to content

Commit

Permalink
fix findAttribute
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Wilkins <[email protected]>
  • Loading branch information
gregw committed Sep 24, 2018
1 parent 304eac7 commit 87aba86
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,27 @@ private AttributeInfo findAttribute(String name)
{
if (name == null)
return null;
AttributeInfo result = _attributes.get(name);
if (result != null)
return result;

AttributeInfo result = null;
for (MetaData intf : _interfaces)
{
result = intf.findAttribute(name);
if (result != null)
return result;
AttributeInfo r = intf.findAttribute(name);
if (r != null)
result = r;
}

if (_parent != null)
return _parent.findAttribute(name);
return null;
{
AttributeInfo r = _parent.findAttribute(name);
if (r != null)
result = r;
}

AttributeInfo r = _attributes.get(name);
if (r != null)
result = r;

return result;
}

Object invoke(String name, String[] params, Object[] args, ObjectMBean mbean) throws ReflectionException, MBeanException
Expand Down

0 comments on commit 87aba86

Please sign in to comment.