| Summary: | [1.8][compiler] NullPointerException in ReferenceExpression.shouldGenerateImplicitLambda when compiling in version 4.4 | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jonathan Rochette <jrochette> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | VERIFIED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jarthana, kaj.hejer, srikanth_sankaran, steinbach.tim |
| Version: | 4.4 | ||
| Target Milestone: | 4.5 M3 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Jonathan Rochette
Are you able to attach a test case that shows the problem ? TIA. Jonathan, any luck with reproducing in a small test case ? I have been trying to make a small test case to reproduce my issue, but all my attemps were unsuccessful. I will try a new approach later this week. (In reply to Jonathan Rochette from comment #3) > I have been trying to make a small test case to reproduce my issue, but all > my attemps were unsuccessful. I will try a new approach later this week. To the extent you are able to share code, even a big test case is fine, I can reduce it down. Thanks. I have just encountered the same issue and was able to reproduce it. See this gist: (I am having trouble attaching the file directly) https://gist.github.com/NeQuissimus/1986029efa51e5b18111 The issue is a method reference or a lambda inside a constructor call, it seems. Separating the two calls does not cause the error to be thrown. (In reply to Tim Steinbach from comment #5) > I have just encountered the same issue and was able to reproduce it. > See this gist: (I am having trouble attaching the file directly) > https://gist.github.com/NeQuissimus/1986029efa51e5b18111 > > The issue is a method reference or a lambda inside a constructor call, it > seems. > Separating the two calls does not cause the error to be thrown. Do you mind opening a different ticket ? The call stack is completely different and so is unrelated to the present problem. Also you can simply copy + paste the code inline into as part of defect submission - no need to attach. To add the code to the test suite, we need it to be posted on bugzilla. TIA. My bad, the stack traces looked similar. I did create a separate issue. Same as bug 444772 *** This bug has been marked as a duplicate of bug 444772 *** Verified for 4.5 M3 using I20141028-2000 build Hi I see this problem on line 135 in the following file: https://utv.uio.no/stash/projects/WAPP/repos/foransatte/commits/b2707460eb9cf7bb6516c849a819900d7d216489#src/main/java/no/uio/webapps/foransatte/jdbc/CustomComponentDAOImpl.java See stracktrace and versioninfo on https://dev.eclipse.org/recommenders/community/confess/#/incidents/yxeTVTAgmSpbZGIb4sP7bYSXbnjrZeg56HhzsBaQHR3fK16wOoeHdUJnoezSptD1 Please ignore my previous comment. Sorry! Hi, it is me again. Sorry for the noise! I redrew my comment because I thought I couldn't reproduce this issue, but I can. If I replace the line return jdbcTemplate.query(sql, this::customComponentMapper); with return null; I don't get this ajdt error. Please see my previous comment for sourcecode and info about eclipse, ajdt and java versions. It seems that a workaround is to replace return jdbcTemplate.query(sql, this::customComponentMapper); with RowMapper<CustomComponent> rowMapper = this::customComponentMapper; return jdbcTemplate.query(sql, rowMapper); Then I can't reproduce this issue. (In reply to Kaj Hejer from comment #10) > Hi > > I see this problem on line 135 in the following file: > https://utv.uio.no/stash/projects/WAPP/repos/foransatte/commits/ > b2707460eb9cf7bb6516c849a819900d7d216489#src/main/java/no/uio/webapps/ > foransatte/jdbc/CustomComponentDAOImpl.java > > See stracktrace and versioninfo on > https://dev.eclipse.org/recommenders/community/confess/#/incidents/ > yxeTVTAgmSpbZGIb4sP7bYSXbnjrZeg56HhzsBaQHR3fK16wOoeHdUJnoezSptD1 Can you extract this into a small snippet? I have trouble setting up the project when doing a "mvn install". |