Clarification request: is it #int(int, int)(throws IOException, SQLException) or something else?

Reinier Zwitserloot reinier at zwitserloot.com
Tue Jun 1 03:58:50 PDT 2010


The spec v0.1.5 (is that the latest version?) seems ambiguous (or perhaps
just confusingly worded) in regards to the syntax for multiple checked
exception types in a closure type. Or I'm having trouble reading it.

Is it:

A) #int(int, int)(throws IOException | SQLException)   [parens, bar]
B) #int(int, int)(throws IOException, SQLException)    [parens, comma]
C) #int(int, int) throws IOException | SQLException    [no parens, bar]
D) #int(int, int) throws IOException, SQLException     [no parens, comma -
this would be unparsable syntax]
E) #int(int, int)(IOException, SQLException)              [no throws, comma]
F) #int(int, int)(IOException | SQLException)              [no throws, bar]

Versions A, B en E all occur in the spec, between clarifications, examples,
and official syntax. I'm fairly sure version C has been discussed on this
mailing list before.

--Reinier Zwitserloot


More information about the lambda-dev mailing list