Greg Mallett
unread,Apr 21, 2012, 10:49:30 AM4/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ActiveJDBC Group
I've been getting strange compile errors in Eclipse 3.6. I was under
the impression, based on the Active JDBC docs & my understanding of
generics, that this would work without the need for casts:
final User user = User.findFirst("username=?", username);
List<UCLImage> images = UCLImage.findAll();
return UCLImage.findById(id).getImage();
UCLImage extends the Active JDBC Model class, so the above should work
with no casts! However, eclipse complains, either with a warning or
it just outright refuses to compile, requiring casts to get it to
work:
final User user = (User) User.findFirst("username=?", username);
@SupressWarnings("unchecked")
List<UCLImage> images = UCLImage.findAll();
return ((UCLImage)UCLImage.findById(id)).getImage();
Any ideas? I'm suspecting an Eclipse issue, but I don't know where to
start fixing it.