Java 7 (original) (raw)

**JSR 275 Units and Quantities**

JSR Proposal Project RI

Description: This JSR specifies one or more Java packages for the programmatic handling of physical quantities and their expression as numbers of units. The specification includes:

Blogs:

**JSR 107 JCache API**

Description: The JCACHE specification standardizes in process caching of Java objects in a way that allows an efficient implementation, and removes from the programmer the burden of implementing cache expiration, mutual exclusion, spooling, and cache consistency.

Blogs:

**JSR 166 Concurrency Utilities**

Description: This JSR originally introduced the concurrency libraries in Java 5 and has since produced enhancements for Java 6. For Java 7, the JSR 166 group will be adding a new kind of BlockingQueue called TransferQueue and a fine-grained parallel computation framework based on divide-and-conquer and work-stealing.

Blogs:

**JSR 225 XQuery API for Java**

JSR

Description: This JSR defines an API for executing XQuery calls and working with results. XQJ is to XQuery what JDBC is to SQL. At a glance, the XQJ API intentionally shares many high-level concepts from JDBC (DataSource, Connection, etc) but supports XQuery specific concepts such as static and dynamic phases, XML-oriented retrieval, etc.

Blogs:

**JSR 284 Resource Consumption Management API**

JSR

Description: The API will allow for partitioning resources (constraints, reservations) among Java applications and for querying about resource availability (notifications). It will also provide means of exposing various kinds of resources. Example resources are heap memory size, CPU time, open JDBC connections, etc. The goal is to allow resources to be managed so that multiple applications might run simultaneously in a JVM and be given finite amounts of memory, cpu, etc. This JSR will build on top of JSR 121 Isolates.

Blogs:

**Miscellaneous Library Changes**

Blogs:

**JSR 296 Swing Application Framework**

Description: This JSR will provide a simple application framework for Swing applications. It will define infrastructure common to most desktop applications. In so doing, Swing applications will be easier to create.

Blogs:


**Automatic Resource Block Management**
Description: A proposal to support scoping of resource usage in a block with automatic resource cleanup. This addresses the common and messy problem of correctly closing or releasing resources in a finally block, particularly when needing to close multiple resources in the same block.
Example:
// Start a block using two resources, which will automatically
// be cleaned up when the block exits scope
do (BufferedInputStream bis = …; BufferedOutputStream bos = …) {
… // Perform action with bis and bos
}
Blogs:
* Chris Hansen on ARM blocks in Scala (2/14/2008)
* Interview with Josh Bloch (11/7/2006)
**Language level XML support**
Description: Add support for multi-line XML (or possibly other languages or kinds of text) to be embedded within code.
Example:
elt.appendChild(
Kermit
);
Blogs:
* Alex Miller on integrating XML via XQuery and scripting (3/27/2007)
* Mark Reinhold talk on XML integration with Java (JavaPolis 2006)
* JavaLobby thread (1/11/2007)
**JavaBean property support**
Wiki
Description: Support properties (and possibly events) as features of the language, with a special syntax for defining and possibly calling them.
Example:
public property String foo;
a->Foo = b->Foo;
Blogs:
* Javier Paniza: Java Properties without Getters and Setters (1/22/2009)
* Rémi Forax: Da Vinci runtime properties (3/23/2008)
* Rémi Forax updates his property proposal (2/7/2008)
* Fred Simon puts together properties and abstract enums (1/28/2008)
* Cay Horstmann says properties get no respect (12/20/2007)
* Eric Burke suggests a PropertyChangeSource interface (11/19/2007)
* Java Posse episode #145 focuses a lengthy discussion on property support idea (10/4/2007)
* Mikael Grev property writeup on JavaLobby (10/3/2007)
* Stephen Colebourne proposes some properties terminology (10/1/2007)
* JavaLobby asks whether property support is needed or wanted in Java 7 (9/27/2007)
* Stephen Colebourne on per-class or per-instance properties (9/27/2007)
* Shai makes a case against the property keyword (7/6/2007)
* Michel Ishizuka posted a patch and writeup for trying out shorthand property access. (6/11/2007)
* Rémi Forax updates his property syntax proposal (5/13/2007)
* Mikael Grev with a new variation on the property change proposal which also encapsulates some event handling (2/23/2007)
* JavaLobby discussion on properties (2/20/2007)
* Ricky Clarkson on property changes (2/18/2007)
* Elliotte Rusty Harold (1/26/2007)
* Alex Miller (1/26/2007)
* Elliotte Rusty Harold (1/25/2007)
* Richard Bair responding to Rémi’s proposal (1/24/2007)
* Richard Bair (1/8/2007)
* Cay Horstmann (1/7/2007)
* Mikael Grev (1/5/2007)
* Rémi Forax (1/5/2007)
* Stephen Coleburne (1/8/2007)
* Kirk (1/5/2007)
* Joe Nuxoll’s properties and events (11/22/2005)
**BigDecimal operator support**
Description: Add support for manipulating BigDecimal objects with arithmetic operators (just like other numeric primitives) instead of via method calls.
Blogs:
* Glyn Normington looks for support of built-in decimal support (8/30/2007)
* Stephen Colebourne on BigDecimal literals and other Big thoughts (7/12/2007)
* Glyn Normington on the need for BigDecimal operator support (2/2/2007)
**Strings in switch statements**
Proposal
Description: Allow switch statements to use strings in the case blocks.
Example:
static boolean booleanFromString(String s) {
switch(s) {
case “true”:
return true;
case “false”:
return false;
}
throw new IllegalArgumentException(s);
}
Blogs:
* Stephen Colebourne on improving enum support in switch (2/2/2007)
**Comparisons for Enums**
Proposal
Description: Allow enum values to work with range operators (<, >, etc)
Example:
boolean isRoyalty(Rank r) {
return rank >= Rank.JACK && rank != Rank.ACE;
}
**Chained invocation**
Proposal
Description: Allow easy chaining of method calls by allowing void methods to implicitly return this. This allows easy creation of fluent APIs that can chain together method calls.
Example:
class Factory {
void setSomething(Something something) { … }
void setOther(Other other) { … }
Thing result() { … }
}
Thing thing = new Factory()
.setSomething(something)
.setOther(other)
.result();
Blogs:
* Przemysław Bielicki: Builder-style setters for Java (10/31/2008)
* Stefan Schulz follows up on Howard’s proposal with his own suggested syntax for chained invocation (1/15/2008)
* Thomas Hawtin proposes an alternative with some syntax sugar (12/25/2007)
* Howard Lovatt with proposals for extension methods and chained invocations (12/13/2007)
* Matthias Ernst with a patch to try out cascading of void functions (5/26/2007)
* Matthias Ernst on allowing cascading of void functions (5/22/2007)
**Extension methods**
Proposal
Description: Allow clients to designate static utility methods to act as if they were part of an interface via static import in the interface.
Example:
import static java.util.Collections.sort;
List list = …;
list.sort(); // looks like call to List.sort(), but really call to static Collections.sort().
Blogs:
* Stefan Schulz: Meta-interfaces: Contracting Generics (2/28/2008)
* Howard Lovatt with a proposal for traits (12/15/2007)
* Howard Lovatt with proposals for extension methods and chained invocations (12/13/2007)
* Yardena proposes a more specific syntax for extension methods (12/9/2007)
* Rémi Forax voices his opinion on extension methods (11/29/2007)
* Stefan Schulz proposes a more generic method currying (11/28/2007)
* Stephen Colebourne proposes an alternative for extension methods (11/27/2007)
* Peter Ahé discusses an alternative to extension methods (11/26/2007)
* Neal elaborates on extension methods (11/20/2007)
* Stefan Schulz with a prototype of meta-interface support (11/10/2007)
* Damien Guard on extension methods in .NET (10/20/2007)
* Stefan Schulz on meta-interfaces (4/10/2007)
* Noah on mixins revisited with FCM closures (2/28/2007)
* Noah on mixins (2/23/2007)


Enhanced null handling
Proposals for Enhanced null handling
Description: Null-ignore invocation is concerned with dealing with possible null values in calling one or especially a chain of methods.
For example, instead of
public String getPostcode(Person person) {
if (person != null) {
Address address = person.getAddress();
if (address != null) {
return address.getPostcode();
}
}
return null;
}
you could instead call:
public String getPostcode(Person person) {
return person?.getAddress()?.getPostcode();
}
Another issue concerns how to handle common if-null scenarios with a shortened form of the ternary operator specific to nulls. So rather than:
String str = getStringMayBeNull();
str = (str == null ? "" : str);
you might do:
String str = getStringMayBeNull() ?: "";
Null safe types is another proposal similar in some ways to the JSR 305/308 annotation proposal for annotating whether parameters may or may not be null.
Blogs:
* Jacek: Null-safe method invocation in Java 7 (3/18/2009)
* Stephan Schmidt: Better Strategies for Null Handling in Java (2/3/2009)
* Stephen Colebourne: Java 7 – Null-default and Null-safe operators (1/6/2009)
* Reinier Zwitserloot: non-null in static languages. (10/23/2008)

Improved catch clause
Proposals Multicatch and Rethrown
Description: First, allow catch to catch multiple exceptions and handle them identically using the “|” operator in the catch block:
try {
return klass.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new AssertionError(e);
}
Second, allow better ways to rethrow exceptions. Generally, programmers often catch a broader exception, handle (for example, via logging), then rethrow. When they rethrow, they must indicate what is being thrown on the method often causing them to either broaden the scope of the thrown exception to a common parent OR wrap the exception. This enhancement allows you to add final to the catch block indicating that a throw will happen on only the thrown checked exceptions within the try block:
try {
doable.doIt();
} catch (final Throwable ex) {
logger.log(ex);
// surrounding method can declare only checked thrown by doIt()
throw ex;
}
Blogs:
* Tom Hawtin suggests that the “catch multiple and rethrow” proposal should be done with generics instead (1/13/2008)
* Brian Goetz suggests multiple catch and rethrow improvements (6/19/2007)
* Colm Smyth recaps the checked exception debate (6/3/2007)
* Neal Gafter on removing language features (5/26/2007)

Language Suggestions
Project Coin Wiki
* Joseph D. Darcy: Project Coin: The Call for Proposals Phase is Over! (4/1/2009)
* David Linsin: JDK 7 Language Changes are Coined (3/29/2009)
* Joseph D. Darcy: Project Coin: Week 4 Update (3/29/2009)
* Joseph D. Darcy: Project Coin: For further consideration… (3/29/2009)
* The Java Posse: Roundup 09 – Project Coin (3/21/2009)
* Joseph D. Darcy: Project Coin: Week 3 Update (3/21/2009)
* Bruce Chapman: Meta Coinage – Role of Syntactic Sugar (3/20/2009)
* Joseph D. Darcy: Project Coin: Week 2 Update (3/18/2009)
* Jeremy Manson: Small Language Changes for JDK7 (2/28/2009)
* Dustin Marx: Small Java 7 Language Changes (2/24/2009)
* Joseph Darcy: FOSDEM 2009: OpenJDK 6 and Project Coin (2/13/2009)
* E. Sammer: Class Categories in Java (2/10/2009)
* Joseph D. Darcy: Project Coin: Small Language Change Proposal Form Available (1/28/2009)
* Stephen Colebourne: JDK 7 language changes – Everyone votes! (1/28/2009)
* Stephen Colebourne: Unique identifier strings (11/9/2008)
* Cédric Champeau: Java 7 idea : change default file encoding (9/23/2008)
* Alex Buckley: Named parameters (9/7/2008)
* Rémi Forax: Parameterized type are NOT inherently unsafe (5/27/2008)
* Chaotic Java: Switch by class type (5/24/2008)
* Stephen Colebourne: For-each loop control access (4/26/2008)
* Stephen Colebourne: Java 7 – For-each loops for Maps (4/19/2008)
* Shams Mahmood: My Java7 Wishlist regarding Collections (4/5/2008)
* Stephen Colebourne suggests a syntax for multi-line string literals (1/28/2008)
* Howard Lovatt suggests eliminating wildcards from generics (1/11/2007)
* Doug Lea, Josh Bloch, and Kevin Bourrillion propose some API enhancements for Java 7 (11/6/2007)
* Fred Simon on a patch for abstract enums (11/2/2007)
* Stephan Schmidt came up with the idea of a standard annotation for indicating licensing and/or copyright (10/23/2007)
* javablog has some more Java 7 language requests (10/24/2007)
* B.K. Oxley has a proposal for delegation (10/23/2007)
* javablog has several Java 7 language requests (10/15/2007)
* Michael Nischt takes my idea of named parameters and runs with it! (8/15/2007)
* John Rose on tuple support in the JVM (7/13/2007)
* Fred Simon has an OpenJDK patch for his abstract enum suggestion(6/23/2007)
* Ricky Clarkson on improving your visitors and a a request for Void as a valid type parameter (6/13/2007)
* Fred on a need for abstract enums (5/23/2007)
* Brian Repko on caching (4/2/2007)
* Fyodor Kupolov on adding base64 encoding (3/28/2007)
* Alexander Schunk on structs and dynamic arrays (3/20/2007)
* Neal Gafter on the need for a weak identity hash map in Java 7 (3/17/2007)
* Bill Venners interviews Geert Bevin on continuation support in Java (3/1/2007)
* Bob Lee on better serialization errors (2/26/2007)
* Stephen Colebourne on literal array syntax (2/20/2007)
* Felipe Leme on semifinal (2/13/2007)
* Stephen Colebourne on the source keyword (1/27/2007)
* Stephen Colebourne on .equals (1/25/2007)

invokedynamic
JSR 292 | DaVinci Machine Projects
Description: Introduces a new bytecode invokedynamic for support of dynamic languages.
Blogs:
* John Rose: JSR 292 support in javac (3/29/2009)
* Danny Coward: Planet Cast One: JSR 292, DaVinci Machines and Multiple-languages (3/23/2009)
* Hamlet D’Arcy: Why Dynamic Languages Metaobject Protocol? (3/18/2009)
* John Rose: simple Java linkage: an invokedynamic apéritif (2/17/2009)
* Dalibor Topic: Towards a Universal VM – FOSDEM 2009 (2/14/2008)
* John Rose: Updates on Da Vinci Machine Work (1/21/2009)
* Arnold Schwaighofer: HotSpot tail calls coming? (1/21/2009)
* Danny Coward: Repeating the JVM Language Summit (1/9/2009)
* Rémi Forax: method handles == closures ?? (1/2/2009)
* Jsr-292’s first draft – a late review (12/19/2008)
* Rémi Forax: ASM and invokedynamic (10/21/2008)
* John Rose: the view from the Summit (10/2/2008)
* Cliff Click: JVM Language Summit (9/30/2008)
* Tim Bray: The Summit (9/30/2008)
* Weiqi Gao: Closures And The Java VM (9/30/2008)
* Ola Bini: JVM Language Summit – Second day (9/30/2008)
* Ola Bini: JVM Language Summit – first day (9/25/2008)
* Ola Bini tweets that InvokeDynamic WILL be in JDK 7 (9/24/2008)
* robilad: OpenJDK roundup (9/18/2008)
* Charles Nutter: A First Taste of InvokeDynamic (9/12/2008)
* Danny Coward: Firing up the engines for multiple languages (8/27/2008)
* John Rose: Happy International Invokedynamic Day! (8/26/2008)
* Tobias Ivarsson: My JVM Wishlist (Part 1): Interface injection (7/16/2008)
* Jeroen Frijters: Invokedynamic Proof of Concept Part 2 (5/24/2008)
* Rémi Forax: Javac + invokedynamic (5/22/2008)
* Jevgeni Kabanov: The JSR 292 — invokedynamic (5/21/2008)
* Jeroen Frijters: Invokedynamic Proof of Concept (5/20/2008)
* John Rose: invokedynamic goes public (5/20/2008)
* John Rose: the golden spike (5/10/2008)
* John Rose: dynamic invocation in the VM (5/7/2008)
* John Rose: JSR 292 meeting at JavaOne 2008 (5/6/2008)
* John Rose: interface injection in the VM (5/5/2008)
* John Rose: continuations in the VM (5/4/2008)
* John Rose: method handles in a nutshell (4/17/2008)
* Andrew Hughes: Virtual Machine Interface proposal (3/2/2008)
* InfoWorld on the Da Vinci Machine (formerly mlvm) (1/31/2008)
* John Rose on anonymous classes in the JVM (1/22/2008)
* Stack frame annotation in the JVM (1/20/2008)
* John Rose on an architecture for dynamic invocation (12/13/2007)
* Frank Cohen provides an update on JSR 292 expert group progress (11/10/2007)
* Charles Oliver Nutter proposes a new exception type called a jump (10/19/2007)
* John Rose on the kickoff meeting for JSR 292 (10/18/2007)
* John Rose proposes a new “multi-language VM” project (10/9/2007)
* John Rose proposes a tail call bytecode for Java 7 (7/12/2007)
* Charles Nutter on the JSR 292 Summit wrap up (5/10/2007)
* InfoQ on on the DLR and the JVM (5/7/2007)
* Neil Bartlett responds to Alex’s post (5/2/2007)
* Alex Blewitt on the JVM, CLR, and the future (5/1/2007)
* Gilad Bracha on invokedynamic and other work for dynamic languages (3/23/2007)
* Abaht Owt (1/29/2007)
* Charles Nutter (JRuby) (1/3/2007)
* Interview with Danny Coward (12/11/2006)
* A. Sundararajan (9/1/2006)
* Gilad Bracha (3/17/2006)

Tiered Compilation
Description: Tiered compilation uses a mix of the client (JIT) and server hot spot compilers – the client engine improves startup time by using JIT over interpreted and the server hot spot compiler gives better optimization for hot spots over time.
Blogs:
* Steve Goldman updates on problems with tiered compilation (8/21/2007)
* Interview with Cliff Click that talks a little about tiered compilation (7/26/2007)
* More from Steve Goldman on the state of tiered compilation (4/11/2007)
* Steve Goldman on tiered compilation almost available in Java 7 builds (3/30/2007)
* Steve Goldman on tiered compilation and batch mode (6/22/2006)
* JavaLobby thread (4/26/2006)
* JavaGaming thread (4/24/2006)

G1 Garbage Collector
Paper
Description: The G1 (for “garbage first”) is a single collector that divides the entire space into regions and allows a set of regions to be collected, rather than split the space into an arbitrary young and old generation. Sun intends to make this new collector the default in Java 7. (This applies only to the Sun JDK.)
Blogs:
* InfoQ: Sun’s Garbage First Collector Largely Eliminates Low Latency/High Throughput Tradeoff (4/16/2009)
* Vikram Aroskar: 3 Differences between CMS and G1 : Random Writes (1/9/2009)
* Danny Coward: Trying a new Garbage Collector for JDK 7 (11/12/2008)
* Kirk Pepperdine: It’s Past Time to Upgrade (8/28/2008)
* JavaOne Interview: Tony Printezis and G1 garbage collector (5/10/2008)
* Daniel Ehrenberg: Some more advanced GC techniques (3/25/2008)
* Jon Masamitsu describes the G1 collector (2/1/2008)


More Script Engines
Description: Add additional language interpreters to JSE. The JavaScript Rhino engine was added in Java 6. Leading candidates for Java 7 are: JRuby, Jython, and Beanshell.
Blogs:
* A. Sundararajan with an update on JSR 223 and scripting support for JavaFX Script, OCaml, and Smalltalk (11/12/2007)
### Weekly Roundup
#### 2008
* January 10th
#### 2007
* December 28th, 18th, 10th
* November 30th, 20th, 12th, 11th, 3rd
* October 29th, 18th, 11th, 2nd
* September 24th, 17th, 10th, 3rd
* August 27th, 20th, 13th
* July 31st, 19th, 8th
* June 28th, 19th, 13th, 7th
* May 30th, 21st, 9th, 2nd
* April 25th, 18th, 11th, 4th
* March 27th, 20th, 13th, 6th
* February 28th, 21st, 14th, 7th