You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2008/07/17 08:43:32 UTC
[jira] Created: (HARMONY-5915) [beans] Introspector.getBeanInfo()
will exclude public static methods.
[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
Fix For: 5.0M6
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.
[jira] Updated: (HARMONY-5915) [beans] Introspector.getBeanInfo()
will exclude public static methods.
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-5915:
--------------------------------
Attachment: HARMONY-5915.diff
Please help me to try it.
> [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.
[jira] Assigned: (HARMONY-5915) [beans] Introspector.getBeanInfo()
will exclude public static methods.
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu reassigned HARMONY-5915:
---------------------------------
Assignee: Sean Qiu
> [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
>
> 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.
[jira] Resolved: (HARMONY-5915) [beans] Introspector.getBeanInfo()
will exclude public static methods.
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu resolved HARMONY-5915.
-------------------------------
Resolution: Fixed
Thanks for your patch, it is applied at r667023.
Could you please verify it if it works as you expected.
> [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.
[jira] Closed: (HARMONY-5915) [beans] Introspector.getBeanInfo()
will exclude public static methods.
Posted by "Tim Ellison (JIRA)" <ji...@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.