Stripes

Spring injection problem when having private fields with the same name in parent and child classes

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: Release 1.5, Release 1.5.1
  • Fix Version/s: Release 1.5.2
  • Component/s: None
  • Labels:
    None

Description

class ParentAction implements ActionBean {
@SpringBean
private Bean1 bean;

public void methodOne() { // use bean }
....
}

class ChildAction extends ParentAction {
@SpringBean
private Bean2 bean;
....
}

NPE is raised on methodOne().

The problem is in method ReflectUtil.getFields(Class<?> clazz), a map based on field name is used

Activity

Hide
Ben Gunter added a comment - 19/Oct/09 3:06 PM

Fixed for 1.5.2 and 1.6

Show
Ben Gunter added a comment - 19/Oct/09 3:06 PM Fixed for 1.5.2 and 1.6

People

Vote (0)
Watch (0)

Dates

  • Created:
    19/Mar/09 12:47 PM
    Updated:
    04/Jan/11 1:55 PM
    Resolved:
    19/Oct/09 3:06 PM