- Strings in Switch, a proposal from Joe Darcy to be able to use Strings in switch statements.
- Automated Resource Blocks, a proposal from Josh Bloch to be able to say things like:
instead of:
try (BufferedReader br = new BufferedReader(new FileReader(path)) {
return br.readLine();
}
based on having BufferedReader implement a Disposable interface.
BufferedReader br = new BufferedReader(new FileReader(path));
try {
return br.readLine();
} finally {
br.close();
} - Block expressions, a proposal from Neal Gafter to be allow things like:
double pi2 = (double pi = Math.PI ; pi*pi)**; // pi squared*
Basically, the principle here is that the (parenthesis-delimited) block would return a value. - Exception handling improvements, another proposal from Neal Gafter to allow things like:
try {
doWork(file);
} catch (final IOException | SQLException ex) {
logger.log(ex);
throw ex;
} - Improved Type Inference, a proposal from me (although I can't claim credit for the idea) to be able to replace things like this:
with things like this:Map<String, List<String>> anagrams = new HashMap<String, List<String>>();
Map<String, List<String>> anagrams = new HashMap<>();
- A new syntax for wildcard variance, again from the prolific Neal Gafter, allowing the user to replace "? extends" with "out" and "? super" with "in". (Can you tell that Neal's been working on C#?)
(For those of you following the various Closures proposals: Closures don't count as a small change, and are therefore not in scope for this JSR.)
ETA: The "use Scala instead" and "where is BGGA?" comments have been made, so please read the comments and feedback before reiterating them.