Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 50093 invoked from network); 26 Jun 2009 13:43:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jun 2009 13:43:18 -0000 Received: (qmail 95022 invoked by uid 500); 26 Jun 2009 13:43:29 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 94985 invoked by uid 500); 26 Jun 2009 13:43:29 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 94976 invoked by uid 99); 26 Jun 2009 13:43:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2009 13:43:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2009 13:43:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 882FC234C1EA for ; Fri, 26 Jun 2009 06:43:07 -0700 (PDT) Message-ID: <1668644881.1246023787557.JavaMail.jira@brutus> Date: Fri, 26 Jun 2009 06:43:07 -0700 (PDT) From: "Tim Ellison (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-5915) [beans] Introspector.getBeanInfo() will exclude public static methods. In-Reply-To: <1713773635.1216277012199.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tim Ellison closed HARMONY-5915. -------------------------------- No response, assuming ok. > [beans] Introspector.getBeanInfo() will exclude public static methods. > ---------------------------------------------------------------------- > > Key: HARMONY-5915 > URL: https://issues.apache.org/jira/browse/HARMONY-5915 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M6 > Reporter: Kevin Zhou > Assignee: Sean Qiu > Fix For: 5.0M6 > > Attachments: HARMONY-5915.diff > > Original Estimate: 24h > Remaining Estimate: 24h > > Given the following test case, > import java.beans.BeanInfo; > import java.beans.Introspector; > import java.beans.MethodDescriptor; > import java.beans.PropertyDescriptor; > public class BeansTest { > public static void main(String[] args) throws Throwable { dumpBean(Empty.class); dumpBean(Static.class); } > static void dumpBean(final Class cl) throws Throwable { > System.out.println("Introspecting: " + cl.getName()); > BeanInfo beanInfo = Introspector.getBeanInfo(cl); > System.out.println(" Properties: "); > for (PropertyDescriptor p : beanInfo.getPropertyDescriptors()) { System.out.println(" + " + p.getName()); System.out.println(" - read: " + p.getReadMethod()); System.out.println(" - write: " + p.getReadMethod()); } > System.out.println(" Methods: "); > for (MethodDescriptor m : beanInfo.getMethodDescriptors()) { System.out.println(" + " + m.getName()); System.out.println(" - " + m.getMethod()); } > } > } > class Empty { > } > class Static { > public static String getName() { return "static class"; } > } > When this test case is run, the output from introspecting the Empty class is identical to that of the output from introspecting the Static class. > There is no information returned for getName(). If I remove the "static" keyword in the declaration of class Static, then introspection DOES return the "getName()" method. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.