Results 1 to 4 of 4

Thread: Bug: "no setter" error when Generics are used

  1. #1
    Join Date
    Apr 2005
    Location
    Wilhelmshaven, Germany
    Posts
    15

    Default Bug: "no setter" error when Generics are used

    SpringIDE reports "No setter found for property 'xxx' in class 'yyy' when class yyy is using a generic type:

    Example:

    public abstract class AbstractCrudDaoHibernate<E extends DomainObject>
    extends HibernateDaoSupport
    implements CrudDao<E> {
    ...
    }

    public class CustomerDaoHibernate
    extends AbstractCrudDaoHibernate<Customer>
    implements CustomerDao {
    ...
    }

    If I try to set the property "sessionFactory" which is declared in the class HibernateDaoSupport on CustomerDaoHibernate the above error is reported. Without the generic type everthing works fine.


    I´ve created an issue at http://opensource.atlassian.com/proj.../browse/IDE-43

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    Hi roman,

    I've created a ticket at http://springide.org/project/ticket/45 .
    Thanks for your report. This looks like a nice bug for Torsten to fix .

    Greetings
    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default

    Quote Originally Posted by cdupuis
    This looks like a nice bug for Torsten to fix .
    Hhm, this bug is a really tough one (I didn't grasp generics by now :-().

    But anyway, to support generics we have to depend on Eclipse 3.1. IMHO we shouldn't introduce this dependency now. Let's wait for a final version of Eclipse 3.1 first before binding Spring IDE to it.

    Cheers,
    Torsten

  4. #4
    Join Date
    Apr 2005
    Location
    Wilhelmshaven, Germany
    Posts
    15

    Default

    I know nothing about Eclipse plugin development or the way SpringIDE is working. So if I´m wrong, just ignore me (or give me a hint) :-)

    to support generics we have to depend on Eclipse 3.1
    Sure? I guess SpringIDE doesn´t need to know anything about generics. The setter method doesn´t use a generic type. Only the class declares one.

    Is there no Eclipse 3.0 API compliant way to ask: "Has class AA the method YY?" If there is one, SpringIDE doesn´t need to know if generics are used and should work on eclipse 3.0 and 3.1. If not, how is SpringIDE currently resolving the methods?

    I´ve viewed Erich Gamma´s presentation at JavaPolis:
    http://www.javalobby.org/av/javapoli...reen.jsp?id=34
    He said something about AST (Abstract Systax Tree) and that other plugins can use it to work with the project´s classes. Maybe it helps.

    I really would like to contribute to SpringIDE, but currently I´m working on my thesis so I don´t have the time. Sorry.

    But anyway, Thorsten and Co., thank you a lot for your great work!!!

    Best regards,

    Roman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •