JDK-8214571 : -Xdoclint of array serialField gives "error: array type not allowed here"
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 11.0.7,12
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-12-01
  • Updated: 2020-05-06
  • Resolved: 2018-12-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.8Fixed 12 b24Fixed
Related Reports
Relates :  
Description
With jdk-12-ea+22 (but not jdk-12-ea+21) I see:

javac -Xdoclint:all ArraySerialField.java
ArraySerialField.java:3: error: array type not allowed here
    /** @serialField longs Long[] the longs */

---

/** Obdoc. */
public class ArraySerialField {
    /** @serialField longs Long[] the longs */
    private static final java.io.ObjectStreamField[] serialPersistentFields = {
        new java.io.ObjectStreamField("longs", Long[].class),
    };
}

Comments
> Nevertheless, I am disappointed to see a regression in an update release persist for more than one update release cycle, as indicated by delay to 11.0.9-oracle. It is in 11.0.8 :)
06-05-2020

Previously I asked "Am I the only user of -Xdoclint ?" More correct is: I'm probably the only one who was using Xdoclint on private javadoc elements, via -Xdoclint:all/protected,reference/private So this is not such a serious bug. Nevertheless, I am disappointed to see a regression in an update release persist for more than one update release cycle, as indicated by delay to 11.0.9-oracle.
06-05-2020

Fix Request (11u) Fixes the regression caused by JDK-8200432. Patch applies cleanly to 11u, new tests fail without the product fix, pass with it. Martin's problem is gone (test case at https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-April/003025.html). tier{1,2} pass.
15-04-2020

Hmmm ... I noticed this same bug when 11.0.7 was released, but I completely forgot that I had previously reported it in 12! Am I the only user of -Xdoclint ?
15-04-2020

This looks like a regression from JDK-8200432, linking up.
15-04-2020

[~hannesw] We either need to modify the recent update for @see to ignore the array-ness of array types (and just link the underlying element type (watch out for multi-dimensional arrays) or we need to special-case the code in @serialField to filter down to the underlying element type before delegating to the code for @see.
01-12-2018

Hmm, annoying side effect of the recent change to disallow array types in @see, {@link}
01-12-2018