Skip to content

Commit 09c21f3

Browse files
committed
Generate Javadoc in HTML 5 format
Replace all <tt> tags with either @code or <code> so that the Javadoc parses as HTML 5. JAVA-3059
1 parent 6298072 commit 09c21f3

File tree

6 files changed

+45
-65
lines changed

6 files changed

+45
-65
lines changed

bson/src/main/org/bson/BSONObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public interface BSONObject {
3030
*
3131
* @param key Name to set
3232
* @param v Corresponding value
33-
* @return the previous value associated with <tt>key</tt>, or <tt>null</tt> if there was no mapping for <tt>key</tt>. (A <tt>null</tt>
34-
* return can also indicate that the map previously associated <tt>null</tt> with <tt>key</tt>.)
33+
* @return the previous value associated with {@code key}, or {@code null} if there was no mapping for {@code key}. (A
34+
* {@code null} return can also indicate that the map previously associated {@code null} with {@code key}.)
3535
*/
3636
Object put(String key, Object v);
3737

bson/src/main/org/bson/ByteBuf.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,18 @@ public interface ByteBuf {
232232
* <p> This method transfers bytes from this buffer into the given
233233
* destination array. If there are fewer bytes remaining in the
234234
* buffer than are required to satisfy the request, that is, if
235-
* <tt>length</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, then no
235+
* <code style="white-space:nowrap">length &gt; remaining()</code>, then no
236236
* bytes are transferred and a {@link java.nio.BufferUnderflowException} is
237237
* thrown.
238238
*
239-
* <p> Otherwise, this method copies <tt>length</tt> bytes from this
239+
* <p> Otherwise, this method copies {@code length} bytes from this
240240
* buffer into the given array, starting at the current position of this
241241
* buffer and at the given offset in the array. The position of this
242-
* buffer is then incremented by <tt>length</tt>.
242+
* buffer is then incremented by {@code length}.
243243
*
244244
* <p> In other words, an invocation of this method of the form
245-
* <tt>src.get(dst,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as
246-
* the loop
245+
* <code style="white-space:nowrap">src.get(dst, off, len)</code>
246+
* has exactly the same effect as the loop
247247
*
248248
* <pre>
249249
* {@code
@@ -261,21 +261,21 @@ public interface ByteBuf {
261261
* @param offset
262262
* The offset within the array of the first byte to be
263263
* written; must be non-negative and no larger than
264-
* <tt>dst.length</tt>
264+
* {@code dst.length}
265265
*
266266
* @param length
267267
* The maximum number of bytes to be written to the given
268268
* array; must be non-negative and no larger than
269-
* <tt>dst.length - offset</tt>
269+
* {@code dst.length - offset}
270270
*
271271
* @return This buffer
272272
*
273273
* @throws java.nio.BufferUnderflowException
274-
* If there are fewer than <tt>length</tt> bytes
274+
* If there are fewer than {@code length} bytes
275275
* remaining in this buffer
276276
*
277277
* @throws IndexOutOfBoundsException
278-
* If the preconditions on the <tt>offset</tt> and <tt>length</tt>
278+
* If the preconditions on the {@code offset} and {@code length}
279279
* parameters do not hold
280280
*/
281281
ByteBuf get(byte[] bytes, int offset, int length);

bson/src/main/org/bson/util/CopyOnWriteMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* mutations, and is useful when you cannot or don't want to synchronize traversals, yet need to preclude interference among concurrent
3131
* threads. The "snapshot" style iterators on the collections returned by {@link #entrySet()}, {@link #keySet()} and {@link #values()} use a
3232
* reference to the internal map at the point that the iterator was created. This map never changes during the lifetime of the iterator, so
33-
* interference is impossible and the iterator is guaranteed not to throw <tt>ConcurrentModificationException</tt>. The iterators will not
33+
* interference is impossible and the iterator is guaranteed not to throw {@code ConcurrentModificationException}. The iterators will not
3434
* reflect additions, removals, or changes to the list since the iterator was created. Removing elements via these iterators is not
3535
* supported. The mutable operations on these collections (remove, retain etc.) are supported but as with the {@link java.util.Map}
3636
* interface, add and addAll are not and throw {@link UnsupportedOperationException}.</p> <p>The actual copy is performed by an abstract

driver-core/src/main/com/mongodb/TagSet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ public Iterator<Tag> iterator() {
8282
}
8383

8484
/**
85-
* Returns <tt>true</tt> if this tag set contains all of the elements of the specified tag set.
85+
* Returns {@code true} if this tag set contains all of the elements of the specified tag set.
8686
*
8787
* @param tagSet tag set to be checked for containment in this tag set
88-
* @return <tt>true</tt> if this tag set contains all of the elements of the specified tag set
88+
* @return {@code true} if this tag set contains all of the elements of the specified tag set
8989
*/
9090
public boolean containsAll(final TagSet tagSet) {
9191
return wrapped.containsAll(tagSet.wrapped);

driver-core/src/main/com/mongodb/internal/connection/AsyncWritableByteChannel.java

Lines changed: 30 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,56 +20,36 @@
2020

2121
import java.nio.ByteBuffer;
2222

23-
/**
24-
* An asynchronous channel that can write bytes.
25-
*
26-
* @since 3.0
27-
*/
23+
// An asynchronous channel that can write bytes.
2824
interface AsyncWritableByteChannel {
29-
/**
30-
* Writes a sequence of bytes to this channel from the given buffer.
31-
*
32-
* <p> This method initiates an asynchronous write operation to write a
33-
* sequence of bytes to this channel from the given buffer. The {@code
34-
* handler} parameter is a completion handler that is invoked when the write
35-
* operation completes (or fails). The result passed to the completion
36-
* handler is the number of bytes written.
37-
*
38-
* <p> The write operation may write up to <i>r</i> bytes to the channel,
39-
* where <i>r</i> is the number of bytes remaining in the buffer, that is,
40-
* {@code src.remaining()} at the time that the write is attempted. Where
41-
* <i>r</i> is 0, the write operation completes immediately with a result of
42-
* {@code 0} without initiating an I/O operation.
43-
*
44-
* <p> Suppose that a byte sequence of length <i>n</i> is written, where
45-
* <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
46-
* This byte sequence will be transferred from the buffer starting at index
47-
* <i>p</i>, where <i>p</i> is the buffer's position at the moment the
48-
* write is performed; the index of the last byte written will be
49-
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>.
50-
* Upon completion the buffer's position will be equal to
51-
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed.
52-
*
53-
* <p> Buffers are not safe for use by multiple concurrent threads so care
54-
* should be taken to not access the buffer until the operation has
55-
* completed.
56-
*
57-
* <p> This method may be invoked at any time. Some channel types may not
58-
* allow more than one write to be outstanding at any given time. If a thread
59-
* initiates a write operation before a previous write operation has
60-
* completed then a {@link java.nio.channels.WritePendingException} will be thrown.
61-
*
62-
* @param src
63-
* The buffer from which bytes are to be retrieved
64-
* @param handler
65-
* The completion handler object
66-
*
67-
* @throws java.nio.channels.WritePendingException
68-
* If the channel does not allow more than one write to be outstanding
69-
* and a previous write has not completed
70-
* @throws java.nio.channels.ShutdownChannelGroupException
71-
* If the channel is associated with a {@link java.nio.channels.AsynchronousChannelGroup
72-
* group} that has terminated
73-
*/
25+
// Writes a sequence of bytes to this channel from the given buffer.
26+
//
27+
// This method initiates an asynchronous write operation to write a
28+
// sequence of bytes to this channel from the given buffer. The
29+
// handler parameter is a completion handler that is invoked when the write
30+
// operation completes (or fails). The result passed to the completion
31+
// handler is the number of bytes written.
32+
//
33+
// The write operation may write up to r bytes to the channel,
34+
// where r is the number of bytes remaining in the buffer, that is,
35+
// src.remaining() at the time that the write is attempted. Where
36+
// r is 0, the write operation completes immediately with a result of
37+
// 0 without initiating an I/O operation.
38+
//
39+
// Suppose that a byte sequence of length n is written, where 0 < n <= r.
40+
// This byte sequence will be transferred from the buffer starting at index
41+
// p, where p is the buffer's position at the moment the write is performed;
42+
// the index of the last byte written will be p + n - 1}.
43+
// Upon completion the buffer's position will be equal to p + n;
44+
// its limit will not have changed.
45+
//
46+
// Buffers are not safe for use by multiple concurrent threads so care
47+
// should be taken to not access the buffer until the operation has
48+
// completed.
49+
//
50+
// This method may be invoked at any time. Some channel types may not
51+
// allow more than one write to be outstanding at any given time. If a thread
52+
// initiates a write operation before a previous write operation has
53+
// completed then a java.nio.channels.WritePendingException will be thrown.
7454
void write(ByteBuffer src, AsyncCompletionHandler<Void> handler);
7555
}

gradle/javadoc.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ allprojects {
5050
encoding = 'UTF-8'
5151
charSet 'UTF-8'
5252
docEncoding 'UTF-8'
53-
addBooleanOption("html4", true)
53+
addBooleanOption("html5", true)
5454
addBooleanOption("-allow-script-in-comments", true)
5555
header = '''
5656
| <script type="text/javascript">

0 commit comments

Comments
 (0)