Skip to content

Commit b26452d

Browse files
committed
JavaDoc: try to fix syntax issues
The maven-javadoc-plugin is confused by some of our (probably malformed) JavaDoc syntax, see `mvn package` output on JDK 17: ``` /home/runner/work/ks-java-runtime-test/ks-java-runtime-test/src/main/java/io/kaitai/struct/ByteBufferKaitaiStream.java:109: warning: empty <p> tag * <p> ^ /home/runner/work/ks-java-runtime-test/ks-java-runtime-test/src/main/java/io/kaitai/struct/ByteBufferKaitaiStream.java:117: error: unexpected end tag: </p> * </p> ^ ``` This `error: unexpected end tag` even prevents `mvn package` from succeeding.
1 parent b3b311c commit b26452d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/main/java/io/kaitai/struct/ByteBufferKaitaiStream.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,13 @@ public ByteBufferKaitaiStream(ByteBuffer buffer) {
8686
* which the associated type was parsed, because the underlying {@link ByteBuffer} might
8787
* contain the data of all parent types and such as well and not only the one the caller is
8888
* actually interested in.
89-
* </p>
9089
* <p>
9190
* The returned {@link ByteBuffer} is always rewinded to position 0, because this stream was
9291
* most likely used to parse a type already, in which case the former position would have been
9392
* at the end of the buffer. Such a position doesn't help a common reading user much and that
9493
* fact can easily be forgotten, repositioning to another index than the start is pretty easy
9594
* as well. Rewinding/repositioning doesn't even harm performance in any way.
96-
* </p>
95+
*
9796
* @return read-only {@link ByteBuffer} to access raw data for the associated type.
9897
*/
9998
public ByteBuffer asRoBuffer() {
@@ -114,22 +113,19 @@ public ByteBuffer asRoBuffer() {
114113
* references to it, which breaks all subsequent <code>read..</code> methods with
115114
* {@link NullPointerException}. Afterwards, a call to {@link System#gc()} will
116115
* typically release the mmap, if garbage collection will be triggered.
117-
* </p>
118116
* <p>
119117
* There is a <a href="https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4724038">
120118
* JDK-4724038 request for adding unmap method</a> filed at Java bugtracker since 2002,
121119
* but as of 2018, it is still unresolved.
122-
* </p>
123120
* <p>
124121
* A couple of unsafe approaches (such as using JNI, or using reflection to invoke JVM
125122
* internal APIs) have been suggested and used with some success, but these are either
126123
* unportable or dangerous (may crash JVM), so we're not using them in this general
127124
* purpose code.
128-
* </p>
129125
* <p>
130126
* For more examples and suggestions, see:
131-
* https://stackoverflow.com/questions/2972986/how-to-unmap-a-file-from-memory-mapped-using-filechannel-in-java
132-
* </p>
127+
* <a href="https://stackoverflow.com/questions/2972986/how-to-unmap-a-file-from-memory-mapped-using-filechannel-in-java">How to unmap a file from memory mapped using FileChannel in java?</a>
128+
*
133129
* @throws IOException if FileChannel can't be closed
134130
*/
135131
@Override

0 commit comments

Comments
 (0)