tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util IntrospectionUtils.java
Date Mon, 04 Oct 2004 09:25:55 GMT
remm        2004/10/04 02:25:55

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        ConnectorMBean.java
               util/java/org/apache/tomcat/util IntrospectionUtils.java
  Log:
  - Fix issue with getProperty in IntrospectionUtils (somehow, it took me forever to spot
it).
  
  Revision  Changes    Path
  1.10      +1 -6      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java
  
  Index: ConnectorMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ConnectorMBean.java	29 Sep 2004 09:55:37 -0000	1.9
  +++ ConnectorMBean.java	4 Oct 2004 09:25:55 -0000	1.10
  @@ -25,7 +25,6 @@
   import javax.management.modelmbean.InvalidTargetObjectTypeException;
   
   import org.apache.catalina.connector.Connector;
  -import org.apache.coyote.ProtocolHandler;
   import org.apache.tomcat.util.IntrospectionUtils;
   
   
  @@ -88,10 +87,6 @@
           try {
               Connector connector = (Connector) getManagedResource();
               result = IntrospectionUtils.getProperty(connector, name);
  -            // FIXME: I don't understand why this is needed
  -            if (result == null) {
  -                result = IntrospectionUtils.getProperty(connector.getProtocolHandler(),
name);
  -            }
           } catch (InstanceNotFoundException e) {
               throw new MBeanException(e);
           } catch (InvalidTargetObjectTypeException e) {
  
  
  
  1.13      +1 -4      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java
  
  Index: IntrospectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- IntrospectionUtils.java	17 Sep 2004 21:57:55 -0000	1.12
  +++ IntrospectionUtils.java	4 Oct 2004 09:25:55 -0000	1.13
  @@ -385,16 +385,13 @@
                   if ("getProperty".equals(methods[i].getName())) {
                       getPropertyMethod = methods[i];
                   }
  -                if ("getAttribute".equals(methods[i].getName())) {
  -                    getPropertyMethod = methods[i];
  -                }
               }
   
               // Ok, no setXXX found, try a getProperty("name")
               if (getPropertyMethod != null) {
                   Object params[] = new Object[1];
                   params[0] = name;
  -                getPropertyMethod.invoke(o, params);
  +                return getPropertyMethod.invoke(o, params);
               }
   
           } catch (IllegalArgumentException ex2) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message