On Sat, Jun 10, 2017 at 10:17 PM, Attila Kelemen <attila.keleme...@gmail.com > wrote:
> If it really breaks the spec, I would change it (and maybe do that anyway > given the number of bugs related to generics in javac and many other > tools). However, I don't understand why it shouldn't work. In the code: > > private static <E extends Throwable> List<TestFactory<E>> test( > Collection<? extends Supplier<? extends E>> factory) { > return factory.stream() > .map(NewClass::testMap) > .collect(Collectors.toList()); > } > > private static <E extends Throwable> TestFactory<E> testMap(Supplier<? > extends E> factory) { > return null; > } > > private static interface TestFactory<E extends Throwable> { > } > > > `factory.stream().map(NewClass::testMap)` should return a > `Stream<TestFactory<E>>` as the method testMap maps values to > `TestFactory<E>` and therefore collect return the list as declared. What is > the problem with the code? > > Also, can you comment on the other javac/generics related issue: > https://netbeans.org/bugzilla/show_bug.cgi?id=270849 I've filled: https://bugs.openjdk.java.net/browse/JDK-8181911 Jan > > 2017-06-10 22:04 GMT+02:00 Jan Lahoda <lah...@gmail.com>: > > > It is: > > http://hg.netbeans.org/main/nb-javac/rev/414b82835861 > > > > Which maps to: > > http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/414b82835861 > > https://bugs.openjdk.java.net/browse/JDK-8039214 > > > > My understanding is that the code shouldn't compile per the spec. > > > > In general, as NetBeans works with a single nb-javac copy, it is not easy > > to keep bug-to-bug compatibility with various JDK releases. So, > sometimes, > > NB produces an error for things that compile on some JDK releases, as it > > uses a newer (nb-)javac which has some bugs fixed. > > > > In this case it might be possible to let the code parse with -source 8 in > > NB, as the change appears to be relatively simple. > > > > In any case - I'd suggest to consider changing the code, as (AFAIK) it > > won't compile under 9. > > > > Jan > > > > > > On Sat, Jun 10, 2017 at 7:07 PM, Attila Kelemen < > > attila.keleme...@gmail.com> > > wrote: > > > > > I did not really made an attempt to find the bug in the sources. I > would > > > expect an unguided bisect search to take an unreasonable amount of time > > > given how much time I need to build NB. So, what I would prefer if > > someone > > > who knows which part of NB is responsible to make this kind of error > > > checking (I fear that it is in nb-javac-api which seems to be external > to > > > the repo) and I would debug it and then review the changes after I know > > > what exactly causes this bug. However, currently I don't even know how > I > > > should debug NB as I have found no guide for it. > > > > > > 2017-06-10 18:49 GMT+02:00 Emilian Bold <emilian.b...@gmail.com>: > > > > > > > My guess is that the bug is nbjavac (i.e. Parser) related and not > part > > of > > > > the Java editor per se > > > > > > > > So the question is what changed between 8.1 and current? > > > > > > > > Come to think of it, did you try running a hg bisect to see if > there's > > a > > > > single commit that introduced this? (It might be the commit that > > changes > > > > the javacimpl JARs, ie nbjavac, and then you bisect that). > > > > > > > > --emi > > > > > > > > Pe 10 iun. 2017, la 19:29, Attila Kelemen < > attila.keleme...@gmail.com> > > a > > > > scris: > > > > > > > > > Hi, > > > > > > > > > > I have a long standing issue with NetBeans preventing me from > > upgrading > > > > > from NB 8.1. I had the issue reported at: > > > > > https://netbeans.org/bugzilla/show_bug.cgi?id=268334 > > > > > > > > > > Does anyone know if the issue was attempted to be fixed? Anyway, > I'm > > > > > willing to assist in debugging the issue if someone helps me on how > > to > > > > > debug an issue like this in NB (sofar I couldn't even find a > > reasonable > > > > way > > > > > to debug NB: I have tried (guessed) running "ant tryme-debug" but > > > running > > > > > this target fails with an error. > > > > > > > > > > Thanks, > > > > > Attila Kelemen > > > > > > > > > >