File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
spring-context/src/main/java/org/springframework/jmx/export Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -762,22 +762,22 @@ protected boolean isMBean(Class<?> beanClass) {
762762 protected DynamicMBean adaptMBeanIfPossible (Object bean ) throws JMException {
763763 Class <?> targetClass = AopUtils .getTargetClass (bean );
764764 if (targetClass != bean .getClass ()) {
765- Class <Object > ifc = ( Class < Object >) JmxUtils .getMXBeanInterface (targetClass );
765+ Class <? > ifc = JmxUtils .getMXBeanInterface (targetClass );
766766 if (ifc != null ) {
767- if (!( ifc .isInstance (bean ) )) {
767+ if (!ifc .isInstance (bean )) {
768768 throw new NotCompliantMBeanException ("Managed bean [" + bean +
769769 "] has a target class with an MXBean interface but does not expose it in the proxy" );
770770 }
771- return new StandardMBean (bean , ifc , true );
771+ return new StandardMBean (bean , (( Class < Object >) ifc ) , true );
772772 }
773773 else {
774- ifc = ( Class < Object >) JmxUtils .getMBeanInterface (targetClass );
774+ ifc = JmxUtils .getMBeanInterface (targetClass );
775775 if (ifc != null ) {
776- if (!( ifc .isInstance (bean ) )) {
776+ if (!ifc .isInstance (bean )) {
777777 throw new NotCompliantMBeanException ("Managed bean [" + bean +
778778 "] has a target class with an MBean interface but does not expose it in the proxy" );
779779 }
780- return new StandardMBean (bean , ifc );
780+ return new StandardMBean (bean , (( Class < Object >) ifc ) );
781781 }
782782 }
783783 }
You can’t perform that action at this time.
0 commit comments