Skip to content

Commit be240b8

Browse files
committed
jdoc checkstyle
1 parent 5ad35b8 commit be240b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+312
-40
lines changed

src/main/java/org/htmlunit/WebClientOptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,9 @@ public void setGeolocation(final Geolocation geolocation) {
853853
geolocation_ = geolocation;
854854
}
855855

856+
/**
857+
* Support class for Geolocation.
858+
*/
856859
public static class Geolocation implements Serializable {
857860
private final double accuracy_;
858861
private final double latitude_;

src/main/java/org/htmlunit/javascript/host/dom/Node.java

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,75 +64,111 @@
6464
@JsxClass
6565
public class Node extends EventTarget {
6666

67-
/** @see org.w3c.dom.Node#ELEMENT_NODE */
67+
/**
68+
* @see org.w3c.dom.Node#ELEMENT_NODE
69+
*/
6870
@JsxConstant
6971
public static final int ELEMENT_NODE = org.w3c.dom.Node.ELEMENT_NODE;
7072

71-
/** @see org.w3c.dom.Node#ATTRIBUTE_NODE */
73+
/**
74+
* @see org.w3c.dom.Node#ATTRIBUTE_NODE
75+
*/
7276
@JsxConstant
7377
public static final int ATTRIBUTE_NODE = org.w3c.dom.Node.ATTRIBUTE_NODE;
7478

75-
/** @see org.w3c.dom.Node#TEXT_NODE */
79+
/**
80+
* @see org.w3c.dom.Node#TEXT_NODE
81+
*/
7682
@JsxConstant
7783
public static final int TEXT_NODE = org.w3c.dom.Node.TEXT_NODE;
7884

79-
/** @see org.w3c.dom.Node#CDATA_SECTION_NODE */
85+
/**
86+
* @see org.w3c.dom.Node#CDATA_SECTION_NODE
87+
*/
8088
@JsxConstant
8189
public static final int CDATA_SECTION_NODE = org.w3c.dom.Node.CDATA_SECTION_NODE;
8290

83-
/** @see org.w3c.dom.Node#ENTITY_REFERENCE_NODE */
91+
/**
92+
* @see org.w3c.dom.Node#ENTITY_REFERENCE_NODE
93+
*/
8494
@JsxConstant
8595
public static final int ENTITY_REFERENCE_NODE = org.w3c.dom.Node.ENTITY_REFERENCE_NODE;
8696

87-
/** @see org.w3c.dom.Node#ENTITY_NODE */
97+
/**
98+
* @see org.w3c.dom.Node#ENTITY_NODE
99+
*/
88100
@JsxConstant
89101
public static final int ENTITY_NODE = org.w3c.dom.Node.ENTITY_NODE;
90102

91-
/** @see org.w3c.dom.Node#PROCESSING_INSTRUCTION_NODE */
103+
/**
104+
* @see org.w3c.dom.Node#PROCESSING_INSTRUCTION_NODE
105+
*/
92106
@JsxConstant
93107
public static final int PROCESSING_INSTRUCTION_NODE = org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE;
94108

95-
/** @see org.w3c.dom.Node#COMMENT_NODE */
109+
/**
110+
* @see org.w3c.dom.Node#COMMENT_NODE
111+
*/
96112
@JsxConstant
97113
public static final int COMMENT_NODE = org.w3c.dom.Node.COMMENT_NODE;
98114

99-
/** @see org.w3c.dom.Node#DOCUMENT_NODE */
115+
/**
116+
* @see org.w3c.dom.Node#DOCUMENT_NODE
117+
*/
100118
@JsxConstant
101119
public static final int DOCUMENT_NODE = org.w3c.dom.Node.DOCUMENT_NODE;
102120

103-
/** @see org.w3c.dom.Node#DOCUMENT_TYPE_NODE */
121+
/**
122+
* @see org.w3c.dom.Node#DOCUMENT_TYPE_NODE
123+
*/
104124
@JsxConstant
105125
public static final int DOCUMENT_TYPE_NODE = org.w3c.dom.Node.DOCUMENT_TYPE_NODE;
106126

107-
/** @see org.w3c.dom.Node#DOCUMENT_FRAGMENT_NODE */
127+
/**
128+
* @see org.w3c.dom.Node#DOCUMENT_FRAGMENT_NODE
129+
*/
108130
@JsxConstant
109131
public static final int DOCUMENT_FRAGMENT_NODE = org.w3c.dom.Node.DOCUMENT_FRAGMENT_NODE;
110132

111-
/** @see org.w3c.dom.Node#NOTATION_NODE */
133+
/**
134+
* @see org.w3c.dom.Node#NOTATION_NODE
135+
*/
112136
@JsxConstant
113137
public static final int NOTATION_NODE = org.w3c.dom.Node.NOTATION_NODE;
114138

115-
/** @see org.w3c.dom.Node#DOCUMENT_POSITION_DISCONNECTED */
139+
/**
140+
* @see org.w3c.dom.Node#DOCUMENT_POSITION_DISCONNECTED
141+
*/
116142
@JsxConstant
117143
public static final int DOCUMENT_POSITION_DISCONNECTED = org.w3c.dom.Node.DOCUMENT_POSITION_DISCONNECTED;
118144

119-
/** @see org.w3c.dom.Node#DOCUMENT_POSITION_PRECEDING */
145+
/**
146+
* @see org.w3c.dom.Node#DOCUMENT_POSITION_PRECEDING
147+
*/
120148
@JsxConstant
121149
public static final int DOCUMENT_POSITION_PRECEDING = org.w3c.dom.Node.DOCUMENT_POSITION_PRECEDING;
122150

123-
/** @see org.w3c.dom.Node#DOCUMENT_POSITION_FOLLOWING */
151+
/**
152+
* @see org.w3c.dom.Node#DOCUMENT_POSITION_FOLLOWING
153+
*/
124154
@JsxConstant
125155
public static final int DOCUMENT_POSITION_FOLLOWING = org.w3c.dom.Node.DOCUMENT_POSITION_FOLLOWING;
126156

127-
/** @see org.w3c.dom.Node#DOCUMENT_POSITION_CONTAINS */
157+
/**
158+
* @see org.w3c.dom.Node#DOCUMENT_POSITION_CONTAINS
159+
*/
128160
@JsxConstant
129161
public static final int DOCUMENT_POSITION_CONTAINS = org.w3c.dom.Node.DOCUMENT_POSITION_CONTAINS;
130162

131-
/** @see org.w3c.dom.Node#DOCUMENT_POSITION_CONTAINED_BY */
163+
/**
164+
* @see org.w3c.dom.Node#DOCUMENT_POSITION_CONTAINED_BY
165+
*/
132166
@JsxConstant
133167
public static final int DOCUMENT_POSITION_CONTAINED_BY = org.w3c.dom.Node.DOCUMENT_POSITION_CONTAINED_BY;
134168

135-
/** @see org.w3c.dom.Node#DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC */
169+
/**
170+
* @see org.w3c.dom.Node#DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
171+
*/
136172
@JsxConstant
137173
public static final int DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
138174
= org.w3c.dom.Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;

src/main/java/org/htmlunit/javascript/host/file/Blob.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,19 @@ public NativePromise arrayBuffer() {
349349
});
350350
}
351351

352+
/**
353+
* @param start An index into the Blob indicating the first byte to include in the new Blob. If you specify
354+
* a negative value, it's treated as an offset from the end of the Blob toward the beginning.
355+
* For example, -10 would be the 10th from last byte in the Blob. The default value is 0.
356+
* If you specify a value for start that is larger than the size of the source Blob,
357+
* the returned Blob has size 0 and contains no data.
358+
* @param end An index into the Blob indicating the first byte that will not be included in the
359+
* new Blob (i.e. the byte exactly at this index is not included). If you specify a negative value,
360+
* it's treated as an offset from the end of the Blob toward the beginning.
361+
* For example, -10 would be the 10th from last byte in the Blob. The default value is size.
362+
* @param contentType The content type to assign to the new Blob; this will be the value of its type property. The default value is an empty string.
363+
* @return a new Blob object which contains data from a subset of the blob on which it's called.
364+
*/
352365
@JsxFunction
353366
public Blob slice(final Object start, final Object end, final Object contentType) {
354367
final Blob blob = new Blob();
@@ -388,6 +401,9 @@ public Blob slice(final Object start, final Object end, final Object contentType
388401
return blob;
389402
}
390403

404+
/**
405+
* @return a ReadableStream which, upon reading, returns the contents of the Blob.
406+
*/
391407
@JsxFunction
392408
public ReadableStream stream() {
393409
throw new UnsupportedOperationException("Blob.stream() is not yet implemented.");
@@ -402,6 +418,9 @@ public NativePromise text() {
402418
return setupPromise(() -> getBackend().getText());
403419
}
404420

421+
/**
422+
* @return the bytes of this blob
423+
*/
405424
public byte[] getBytes() {
406425
return getBackend().getBytes(0, (int) getBackend().getSize());
407426
}

src/main/java/org/htmlunit/util/KeyDataPair.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ public KeyDataPair(final String key, final File file, final String fileName,
8080
* @param name will passed as name to the super constructor
8181
* @param value will be passed as value to the super constructor
8282
* @param file the file, may be null
83-
* @param fileName, the filename, may be null
84-
* @param mimeType, the mimetype, may be null
85-
* @param charset, the charset, may be null
83+
* @param fileName the filename, may be null
84+
* @param mimeType the mimetype, may be null
85+
* @param charset the charset, may be null
8686
*/
8787
private KeyDataPair(final String name, final String value, final File file,
8888
final String fileName, final String mimeType, final Charset charset,

src/main/java/org/htmlunit/websocket/JettyWebSocketAdapter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ public abstract class JettyWebSocketAdapter implements WebSocketAdapter {
3838
private volatile Session incomingSession_;
3939
private Session outgoingSession_;
4040

41+
/**
42+
* Ctor.
43+
* @param webClient the {@link WebClient}
44+
*/
4145
public JettyWebSocketAdapter(final WebClient webClient) {
4246
super();
4347
final WebClientOptions options = webClient.getOptions();

src/test/java/org/htmlunit/CacheTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ public void testNoStoreCacheControl() throws Exception {
627627
assertEquals(4, connection.getRequestCount());
628628
}
629629

630+
/**
631+
* @throws Exception if an error occurs
632+
*/
630633
@Test
631634
public void testNoCacheCacheControl() throws Exception {
632635
final String html = "<html><head><title>page 1</title>\n"

src/test/java/org/htmlunit/CodeStyleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class CodeStyleTest {
6262

6363
/**
6464
* After.
65-
* @throws IOException
65+
* @throws IOException in case of error
6666
*/
6767
@After
6868
public void after() throws IOException {

src/test/java/org/htmlunit/CookieManager5Test.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
@RunWith(BrowserRunner.class)
4444
public class CookieManager5Test extends WebServerTestCase {
4545

46+
/**
47+
* @throws Exception if an error occurs
48+
*/
4649
@Test
4750
public void sameDomainWithClientCookie() throws Exception {
4851
final List<NameValuePair> headers = new ArrayList<>();
@@ -64,6 +67,9 @@ public void sameDomainWithClientCookie() throws Exception {
6467
}
6568
}
6669

70+
/**
71+
* @throws Exception if an error occurs
72+
*/
6773
@Test
6874
public void unqualifiedHostWithClientCookie() throws Exception {
6975
final List<NameValuePair> headers = new ArrayList<>();
@@ -85,6 +91,9 @@ public void unqualifiedHostWithClientCookie() throws Exception {
8591
}
8692
}
8793

94+
/**
95+
* @throws Exception if an error occurs
96+
*/
8897
@Test
8998
public void subdomainWithClientCookie() throws Exception {
9099
final List<NameValuePair> headers = new ArrayList<>();
@@ -106,6 +115,9 @@ public void subdomainWithClientCookie() throws Exception {
106115
}
107116
}
108117

118+
/**
119+
* @throws Exception if an error occurs
120+
*/
109121
@Test
110122
public void differentSubdomainWithClientCookie() throws Exception {
111123
final List<NameValuePair> headers = new ArrayList<>();

src/test/java/org/htmlunit/NoHttpResponseTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public class NoHttpResponseTest {
6060
@RunWith(BrowserRunner.class)
6161
public static class WithWebDriverTest extends WebDriverTestCase {
6262

63+
/**
64+
* Resets the {@link MiniServer}.
65+
*
66+
* @throws Exception in case of error
67+
*/
6368
@After
6469
public void after() throws Exception {
6570
MiniServer.resetDropRequests();
@@ -126,6 +131,11 @@ public void callSubmitInButtonAndReturnTrue() throws Exception {
126131
@RunWith(BrowserRunner.class)
127132
public static class WithWebClientTest extends SimpleWebTestCase {
128133

134+
/**
135+
* Resets the {@link MiniServer}.
136+
*
137+
* @throws Exception in case of error
138+
*/
129139
@After
130140
public void after() throws Exception {
131141
MiniServer.resetDropRequests();

src/test/java/org/htmlunit/html/ClickableElementTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private void onClickPageTest(final String htmlContent, final int numClicks) thro
7171
* @param htmlContent HTML fragment for body of page with clickable element identified by clickId ID attribute
7272
* @param numClicks number of times to click element
7373
* @param expectedAlerts array of expected popup values
74-
* @param exceptionOnError
74+
* @param exceptionOnError indicate to throw on error
7575
* @throws Exception if the test fails
7676
*/
7777
private void onClickPageTest(final String htmlContent, final int numClicks,

0 commit comments

Comments
 (0)