I am using AEM 6.2 SP1 with Java 8. If I write any Java 8 lambda expression in any of the Java class; the application fails - throwing a NullPointerException i.e. ResourceResolverFactory is null. The lambda expression has nothing to do with the ResourceResolverFactory and written in a completely different class.
But Strangely, If I use any other Java 8 features e.g. Stream, Optional etc. it works fine without any issue.
Please help me with this issue. How to make AEM support lambda expressions.