#145 Bug in ReflectionUtils.getInterfacePropertyDescriptors()

Dozer v.4.3
closed-fixed
None
5
2008-10-22
2008-07-08
No

I have no clue what the method does, but Eclipse tells me that the variable j declared in the following line is never used:

for (int j = 0; i < superInterfacePropertyDescriptors.size(); i++)

Something got mixed up with i and j.

Discussion

  • Björn Küng

    Björn Küng - 2008-07-22

    Logged In: YES
    user_id=2154996
    Originator: NO

    This loop should actually use the 'j' variable for iteration and not 'i' from the outer loop. To fix this also correct the variable name on the next line:

    PropertyDescriptor superPropDescriptor = (PropertyDescriptor) superInterfacePropertyDescriptors.get(j);

    The problem now is that if an interface extends more than one interface, you don't get all PropertyDescriptors of the second interface. The first one is skipped because 'i' already has the value 1 and ignores the PropertyDescriptor on index 0.

     
  • dmitry (lv)

    dmitry (lv) - 2008-10-22
    • assigned_to: nobody --> buzdin
     
  • dmitry (lv)

    dmitry (lv) - 2008-10-22
    • milestone: --> Dozer v.4.3
    • status: open --> closed-fixed
     
  • dmitry (lv)

    dmitry (lv) - 2008-10-22

    Looks like a bug to me. Fixed, will be included in 4.3 release soon.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks