Errata for Java Language Specification 3rd Edition
Asked Answered
R

2

4

I use JLS extensively both as a learning and teaching resource, but I've noticed that there are some errors in it.

There's the simple typos (e.g. JLS 5.1.4 "convesions"), but there's also some that I consider quite serious errors.

For example, JLS 18.1 The Grammar of the Java Programming Language is supposed to be the authoritative reference for the grammar of the Java language, but it contains a production rule that never gets used! (e.g. MoreStatementExpressions). Surely this is a sign of more serious errors in other parts of the given grammar, right?

So is there an errata for the 3rd edition? Will there ever be? Should we send errors we've found to Sun/Oracle? Will there ever be a 4th edition?

Regimen answered 18/4, 2010 at 5:15 Comment(7)
This is the best I can find - java.sun.com/docs/books/jls/updates.jspHazlip
JLS 4.8 "a raw type is define to be either"Regimen
JLS 15.8.2 "…a class literal, C.Class, where…"Regimen
JLS 8.4 "…but this is discouraged as a matter of syle."Regimen
Same situation with the JVM spec, last I was involved (about two years back). There were bits and pieces in the back chapters that had been updated, but major errors/changes in many parts of the main doc, and no updates apparently forthcoming.Meliamelic
(I have found, upon feeding it into a parser generator, that the grammar contains numerous errors.)Meliamelic
Since we're griping, the specification for the serialization format is woefully patchy too.Dorree
M
1

The best I can find is the "Maintenance Review of JSR 901 (Java(tm) Language Specification) for Java SE 7".


However, the problems that the OP is concerned about are hardly serious ...

Surely this is a sign of more serious errors in other parts of the given grammar, right?

I'd say "Wrong" on this. An unused production is little more than a typographical / editing error. It makes no difference to the meaning of the Java grammar.


FWIW: Oracle's main JLS page has no mention of the JSR 901 revision effort (which has apparently finished!) and that the link for providing feedback on the JLS is broken.

Messeigneurs answered 29/5, 2011 at 7:11 Comment(0)
S
1

I have also been burned by problems with the grammar in JLS chapter 18, and by problems elsewhere in the JLS. Although many Java programmers may not be affected by them, these are not trivial problems when you are building a compiler or program analysis tool.

Many of the problems with the JLS have been fixed in the latest version of the JLS ("JLS, Java SE edition" or, informally, "JLS 4th edition"). In particular, chapter 18 (the Java grammar) has been completely revised and reorganized.

You can find the latest JLS at the Java SE Specifications download page (direct link to JLS PDF).

UPDATE Feb 18, 2012: As described at https://blogs.oracle.com/abuckley/en_US/entry/jls7_and_jvms7_online, the Java SE 7 Editions of the Java Language Specification and the JVM Specification are now available at http://docs.oracle.com/javase/specs/ in both PDF and HTML form.

Samuel answered 4/8, 2011 at 22:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.