Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 96507 invoked from network); 4 Oct 2004 09:27:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Oct 2004 09:27:22 -0000 Received: (qmail 81986 invoked by uid 500); 4 Oct 2004 09:26:07 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 81884 invoked by uid 500); 4 Oct 2004 09:26:05 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 81860 invoked by uid 500); 4 Oct 2004 09:26:04 -0000 Received: (qmail 81849 invoked by uid 99); 4 Oct 2004 09:26:03 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 04 Oct 2004 02:26:02 -0700 Received: (qmail 95896 invoked by uid 1135); 4 Oct 2004 09:25:55 -0000 Date: 4 Oct 2004 09:25:55 -0000 Message-ID: <20041004092555.95895.qmail@minotaur.apache.org> From: remm@apache.org To: jakarta-tomcat-connectors-cvs@apache.org Subject: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util IntrospectionUtils.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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