Annogen

getDeclaredFields method of interface JClass does not work as advertised

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Blocker Blocker
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: JAM
  • Labels:
    None
  • Environment:
    Window, jdk15011,
  • Number of attachments :
    0

Description

The javadoc says that this method returns all the fields of a class but NOT the inherited fields.

For eg. if I have

class A {

public String field1 ;

}

class B extends A { public String field2 ; }

If I create a JClass based on B, then getDeclaredFields currently returns an array that has field1 and field2.

Based on javadoc - It should return only fields of B - that is field2.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: