#221 Improve generics usage

Dozer v.5.3.0
closed
5
2010-09-16
2010-09-14
wujek
No

DozerBeanMapper.setEventListeners(List<DozerEventListener>) takes only a list of DozerEventListeners, due to the way generics work. So, for example, this is not possible:
dozer.setEventListeners(Arrays.asList(new MyListener()));
as it returns a List<MyListener>.

The method signatures could be improved to read something like:
DozerBeanMapper.setEventListeners(List<? extends DozerEventListener>)

Discussion

  • dmitry (lv)

    dmitry (lv) - 2010-09-16
    • milestone: --> Dozer v.5.3.0
    • assigned_to: nobody --> buzdin
    • status: open --> closed
     
  • dmitry (lv)

    dmitry (lv) - 2010-09-16

    done

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks