Because of retrolambda, we can use java 8 lambda feature in java 5 6 7. so, How to make Intellij Idea allow lambda in java 5 6 7 language level, also with ide features for lambda ?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
In IntelliJ IDEA you will need to set the language level for the module to be Java 8, or else IDEA will give red squiggly lines about lambda expressions.
In
Settings | Inspections | Java language level migration aids | Usages of API documented as @since 1.5 (1.6|1.7)
you can choose it to warn about usages of API that is documented as@since 1.8
.Additionally you should run all the tests for your project using the Java 7 runtime, or whatever is your target. For Maven this can be configured using Surefire's jvm property. During development, inside IDEA, it's more practical to run the tests just with Java 8.