Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #30386
| From | Tassilo Horn <tsdh@gnu.org> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Generic return types |
| Date | 2014-11-22 14:54 +0100 |
| Organization | University Koblenz-Landau Campus Koblenz |
| Message-ID | <87389bxrvw.fsf@thinkpad-t440p.tsdh.org> (permalink) |
| References | <05bv6a9l6ja7g57s6oo7o0o2s923f6li8c@4ax.com> <546fbd53$0$304$14726298@news.sunsite.dk> |
Arne Vajhøj <arne@vajhoej.dk> writes: >> I wrote some code like this >> >> Iterable<File> allFiles() ... >> >> The IntelliJ lint complained about this saying I should not be using >> generics in the return type. >> >> Is that correct? If so, why? > > I don't think so. > > I can not see the justification for such a rule. > > And there are lots of methods in java.util > classes that use generics in return types. > So apparently SUN/Oracle is not convinced either. Just a blind guess but maybe Roedy has set the source compatibility level to java 1.4? Well, that shouldn't only affect generic return types but all usages of generics... Bye, Tassilo
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Generic return types Roedy Green <see_website@mindprod.com.invalid> - 2014-11-21 13:22 -0800
Re: Generic return types Arne Vajhøj <arne@vajhoej.dk> - 2014-11-21 17:31 -0500
Re: Generic return types Tassilo Horn <tsdh@gnu.org> - 2014-11-22 14:54 +0100
Re: Generic return types Roedy Green <see_website@mindprod.com.invalid> - 2014-11-23 05:27 -0800
csiph-web