commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bugs #10908] Static method mistaken for JavaBeans getter


From: Robert Schuster
Subject: [commit-cp] [bugs #10908] Static method mistaken for JavaBeans getter
Date: Thu, 04 Nov 2004 11:49:47 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.3) Gecko/20040930

This mail is an automated notification from the bugs tracker
 of the project: classpath.

/**************************************************************************/
[bugs #10908] Latest Modifications:

Changes by: 
                Robert Schuster <address@hidden>
'Date: 
                Thu 11/04/2004 at 16:43 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
         Assigned to | None                      | rschuster
              Status | Open                      | Accepted


------------------ Additional Follow-up Comments ----------------------------
I am on this.

Can you provide a simple test case where this bug shows up? (pseudo javacode is 
ok)

Do you think its OK to just exclude static methods from being added in 
IntrospectionIncubator? If so my fix would replace line:

if(Modifier.isPublic(method.getModifiers())) {
  // code that really adds the method
}

with

if(Modifier.isPublic(method.getModifiers()) &&
   !Modifier.isStatic(method.getModifiers())) {
  // code that really adds the method
}






/**************************************************************************/
[bugs #10908] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10908>
Project: classpath
Submitted by: 0
On: Thu 11/04/2004 at 15:44

Category:  classpath
Severity:  5 - Average
Resolution:  None
Privacy:  Public
Assigned to:  rschuster
Status:  Accepted
Platform Version:  None


Summary:  Static method mistaken for JavaBeans getter

Original Submission:  There appears to be a problem in 
gnu.java.beans.IntrospectionIncubator. In the method 
addMethod(java.lang.reflect.Method), there is no check whether the method is an 
instance or static method. This results in methods with the signature:

public static <Type> getXXX();

being mistaken for JavaBeans property accessors. This looks and feels wrong, 
and causes concrete problems for some applications that use JavaBeans.

Follow-up Comments
------------------


-------------------------------------------------------
Date: Thu 11/04/2004 at 16:43       By: Robert Schuster <rschuster>
I am on this.

Can you provide a simple test case where this bug shows up? (pseudo javacode is 
ok)

Do you think its OK to just exclude static methods from being added in 
IntrospectionIncubator? If so my fix would replace line:

if(Modifier.isPublic(method.getModifiers())) {
  // code that really adds the method
}

with

if(Modifier.isPublic(method.getModifiers()) &&
   !Modifier.isStatic(method.getModifiers())) {
  // code that really adds the method
}












For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10908>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]