You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importjava.nio.ByteBuffer;
interfaceBufferAllocator {
/// Returns a lease for a [ByteBuffer] with at least the specified [capacity][ByteBuffer#capacity].LeasedByteBuffergetByteBuffer(longminCapacity);
}
Formatting the above code causes the following issues:
The doc comment is split into two lines, but the second line starts with // instead of ///.
The import statement is removed, breaking the links.
Disabling Javadoc formatting doesn't prevent either issue.
The only workaround I could find was to disable google-java-format.
Tested with JDK 23 and google-java-format 1.24.0.
The text was updated successfully, but these errors were encountered:
So we would like to move this forward somehow, since Apache Lucene (main branch) is on Java 23 already and will go to Java 24 as soon as it's released, probably.
An ideal way forward would be to format markdown nicely... but maybe a baby step of not touching any comment lines starting with /// would also do the job? I did a hacky experiment here -
And it works like a charm, at least for me. I think in reality a line comment starting with a '/' is going to be a rare occurrence so the impact surface seems to be low... but I'm not the one to judge. Let me know if you'd like me to develop this further into a PR (so that the tests pass).
Consider the following code:
Formatting the above code causes the following issues:
//
instead of///
.Disabling Javadoc formatting doesn't prevent either issue.
The only workaround I could find was to disable google-java-format.
Tested with JDK 23 and google-java-format 1.24.0.
The text was updated successfully, but these errors were encountered: