Skip to content

Commit 1ea4cc5

Browse files
committed
Fix JavaDoc errors
1 parent 99b3512 commit 1ea4cc5

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS test integration-test
3535
cat target/site/jacoco/index.html | grep -o 'Total[^%]*%'
3636
37+
- name: Test JavaDoc
38+
run: mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS javadoc:javadoc
39+
3740
- name: Add coverage to PR
3841
id: jacoco
3942
uses: madrapps/jacoco-report@v1.2

src/main/java/com/getindata/connectors/http/HttpSink.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
*
1717
* <p>
1818
* To create a new instance of this class use {@link HttpSinkBuilder}. An example would be:
19-
* <pre>
19+
* <pre>{@code
2020
* HttpSink<String> httpSink =
2121
* HttpSink.<String>builder()
2222
* .setEndpointUrl("http://example.com/myendpoint")
2323
* .setElementConverter(
2424
* (s, _context) -> new HttpSinkRequestEntry("POST", "text/plain",
2525
* s.getBytes(StandardCharsets.UTF_8)))
2626
* .build();
27-
* </pre>
27+
* }</pre>
2828
*
2929
* @param <InputT> type of the elements that should be sent through HTTP request.
3030
*/

src/main/java/com/getindata/connectors/http/HttpSinkBuilder.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* <p>The following example shows the minimum setup to create a {@link HttpSink} that writes String
1919
* values to an HTTP endpoint using POST method.
2020
*
21-
* <pre>
21+
* <pre>{@code
2222
* HttpSink<String> httpSink =
2323
* HttpSink.<String>builder()
2424
* .setEndpointUrl("http://example.com/myendpoint")
@@ -27,7 +27,7 @@
2727
* "POST",
2828
* s.getBytes(StandardCharsets.UTF_8)))
2929
* .build();
30-
* </pre>
30+
* }</pre>
3131
*
3232
* <p>If the following parameters are not set in this builder, the following defaults will be used:
3333
* <ul>
@@ -107,8 +107,9 @@ public HttpSinkBuilder<InputT> setElementConverter(
107107

108108
/**
109109
* Set property for Http Sink.
110-
* @param propertyName property name.
111-
* @param propertyValue property value.
110+
* @param propertyName property name
111+
* @param propertyValue property value
112+
* @return {@link HttpSinkBuilder} itself
112113
*/
113114
public HttpSinkBuilder<InputT> setProperty(String propertyName, String propertyValue) {
114115
this.properties.setProperty(propertyName, propertyValue);
@@ -117,7 +118,8 @@ public HttpSinkBuilder<InputT> setProperty(String propertyName, String propertyV
117118

118119
/**
119120
* Add properties to Http Sink configuration
120-
* @param properties Properties to add.
121+
* @param properties properties to add
122+
* @return {@link HttpSinkBuilder} itself
121123
*/
122124
public HttpSinkBuilder<InputT> setProperties(Properties properties) {
123125
this.properties.putAll(properties);

src/main/java/com/getindata/connectors/http/internal/table/sink/HttpDynamicSink.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ public HttpDynamicTableSinkBuilder setConsumedDataType(DataType consumedDataType
193193

194194
/**
195195
* Set property for Http Sink.
196-
* @param propertyName property name.
197-
* @param propertyValue property value.
196+
* @param propertyName property name
197+
* @param propertyValue property value
198+
* @return {@link HttpDynamicTableSinkBuilder} itself
198199
*/
199200
public HttpDynamicTableSinkBuilder setProperty(String propertyName, String propertyValue) {
200201
this.properties.setProperty(propertyName, propertyValue);
@@ -203,7 +204,8 @@ public HttpDynamicTableSinkBuilder setProperty(String propertyName, String prope
203204

204205
/**
205206
* Add properties to Http Sink configuration
206-
* @param properties Properties to add.
207+
* @param properties properties to add
208+
* @return {@link HttpDynamicTableSinkBuilder} itself
207209
*/
208210
public HttpDynamicTableSinkBuilder setProperties(Properties properties) {
209211
this.properties.putAll(properties);

src/main/java/com/getindata/connectors/http/internal/utils/ConfigUtils.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public final class ConfigUtils {
2424
* @param properties properties to extract keys from.
2525
* @param keyPrefix prefix used to match property name with.
2626
* @param valueClazz type to cast property values to.
27+
* @param <T> type of the elements of a returned map.
2728
* @return Map of propertyName to propertyValue.
2829
*/
2930
public static <T> Map<String, T> propertiesToMap(
@@ -83,16 +84,19 @@ public static String extractPropertyLastElement(String propertyKey) {
8384
/**
8485
* Flat map a given Map of header name and header value map to an array containing both header
8586
* names and values. For example, header map of
86-
* <pre>
87+
* <pre>{@code
8788
* Map.of(
8889
* header1, val1,
8990
* header2, val2
9091
* )
91-
* </pre>
92+
* }</pre>
9293
* will be converter to an array of:
93-
* <pre>
94+
* <pre>{@code
9495
* String[] headers = {"header1", "val1", "header2", "val2"};
95-
* </pre>
96+
* }</pre>
97+
*
98+
* @param headerMap mapping of header names to header values
99+
* @return an array containing both header names and values
96100
*/
97101
public static String[] toHeaderAndValueArray(Map<String, String> headerMap) {
98102
return headerMap

0 commit comments

Comments
 (0)