Two Uncertain Technical Errors and Omissions of JLS 21

jim jimdragongod at 126.com
Fri Nov 3 07:23:41 UTC 2023


Dear Authors of JLS 21:
    I've found two uncertain technical errors and omissions of 《The Java® Language Specification Java SE 21 Edition》,as follows:
(1)uncertain omission
      The "Chapter 19. Syntax" says: "This chapter repeats the syntactic grammar given in Chapters 4, 6-10, 14, and 15, as well as key parts of the lexical grammar from Chapter 3, using the notation from §2.4."  I checked over all the repeated productions after Chapter 3, and found that the "Productions from §14 (Blocks, Statements, and Patterns)" lacked the definition of production "VariableAccess", which is:
    VariableAccess:
        ExpressionName
        FieldAccess
I think this may be an omission, because all other productions after Chapter 3 are present.
(2)uncertain error comment
Sited from the two possible execution order "Example 17.4.5-1" in Chapter 17:
1: B = 1;
3: A = 2;
2: r2 = A; // sees initial write of 0
4: r1 = B; // sees initial write of 0
and
1: r2 = A; // sees write of A = 2
3: r1 = B; // sees write of B = 1
2: B = 1;
4: A = 2;
I think there should be a swap between the above comments,is it right?
Yours sincerely,
Jim DG,a Chinese Java Programmer since 2008.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jls-jvms-spec-comments/attachments/20231103/dc309a2d/attachment-0001.htm>


More information about the jls-jvms-spec-comments mailing list