You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider marking all applicable Spring callback interfaces with Java 8's @FunctionalInterface. Even if that marker basically just works as a compiler assertion along the lines of @Override, it might still be worth using it consistently as a formal documentation measure. Applicable Spring interfaces can then by found by that marker and will be documented as such in javadoc.
We're not adding @FunctionalInterface for the time being, since it would only buy us a documentation effect but introduces a risk for potential class loading issues on older JVMs. Even if, technically, a JVM should ignore a declared annotation if it cannot find the annotation type in the classpath, there may be unpleasant warnings or the like displayed on non-Sun/Oracle JVMs.
In all other respects, the obvious candidate interfaces in the core codebase are all naturally compliant with Java 8's rules. There are a few niche interfaces that declare more than one method (e.g. BatchPreparedStatementSetter) and a few base implementations of callback interfaces that declare a different abstract template method (e.g. AbstractLobStreamingResultSetExtractor); however, we're not considering those as important enough to split them into their own functional interface variant.
Uh oh!
There was an error while loading. Please reload this page.
Juergen Hoeller opened SPR-9640 and commented
http://openjdk.java.net/jeps/126
Consider marking all applicable Spring callback interfaces with Java 8's
@FunctionalInterface
. Even if that marker basically just works as a compiler assertion along the lines of@Override
, it might still be worth using it consistently as a formal documentation measure. Applicable Spring interfaces can then by found by that marker and will be documented as such in javadoc.This issue is a sub-task of #14273
0 votes, 6 watchers
The text was updated successfully, but these errors were encountered: