-
Bug
-
Resolution: Done
-
Major
-
None
-
None
The javax.management.MBeanOperationInfo.equals() of jdk5 produces NPEs when any field of the "other" object is null:
public boolean equals(Object o)
{ if (o == this) return true; if (!(o instanceof MBeanOperationInfo)) return false; MBeanOperationInfo p = (MBeanOperationInfo) o; return (p.getName().equals(getName()) && p.getReturnType().equals(getReturnType()) && p.getDescription().equals(getDescription()) && p.getImpact() == getImpact() && Arrays.equals(p.fastGetSignature(), fastGetSignature())); }This could be a jdk bug, however the problem appears in when viewing the MainDeployer mbean through the jmx-console, due to the descriptor field of some "deploy" operation being null in the xmbean descriptor.
org.apache.jasper.JasperException: Exception in JSP: /inspectMBean.jsp:94
91:
{ 92: MBeanOperationInfo opInfo = operationInfo[a]; 93: System.out.println(String.valueOf(a) + opInfo); 94: operationInfoIndexMap.put(opInfo, String.valueOf(a)); 95: }96:
97: Arrays.sort(operationInfo, MBEAN_FEATURE_INFO_COMPARATOR);
root cause
java.lang.NullPointerException
javax.management.MBeanOperationInfo.equals(MBeanOperationInfo.java:209)
java.util.HashMap.eq(HashMap.java:277)
java.util.HashMap.put(HashMap.java:386)
org.apache.jsp.inspectMBean_jsp._jspService(inspectMBean_jsp.java:155)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
The problem doesn't affect Branch_4_0, since the inspectMBean.jsp code is different