Skip to content

Commit b0efa87

Browse files
committed
Fix docs warnings
1 parent f6313fa commit b0efa87

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,18 @@
243243
<plugin>
244244
<groupId>org.apache.maven.plugins</groupId>
245245
<artifactId>maven-javadoc-plugin</artifactId>
246-
<version>2.9.1</version>
246+
<version>3.4.0</version>
247+
<configuration>
248+
<failOnWarnings>true</failOnWarnings>
249+
</configuration>
247250
<executions>
251+
<execution>
252+
<id>vet-javadoc</id>
253+
<phase>validate</phase>
254+
<goals>
255+
<goal>jar</goal>
256+
</goals>
257+
</execution>
248258
<execution>
249259
<id>attach-javadocs</id>
250260
<goals>

src/main/java/dev/openfeature/javasdk/internal/ObjectUtils.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ public class ObjectUtils {
1111

1212
/**
1313
* If the source param is null, return the default value.
14+
* @param source maybe null object
15+
* @param defaultValue thing to use if source is null
16+
* @param <T> list type
17+
* @return resulting object
1418
*/
1519
public static <T> List<T> defaultIfNull(List<T> source, Supplier<List<T>> defaultValue) {
1620
if (source == null) {
@@ -21,6 +25,11 @@ public static <T> List<T> defaultIfNull(List<T> source, Supplier<List<T>> defaul
2125

2226
/**
2327
* If the source param is null, return the default value.
28+
* @param source maybe null object
29+
* @param defaultValue thing to use if source is null
30+
* @param <K> map key type
31+
* @param <V> map value type
32+
* @return resulting map
2433
*/
2534
public static <K, V> Map<K, V> defaultIfNull(Map<K, V> source, Supplier<Map<K, V>> defaultValue) {
2635
if (source == null) {
@@ -31,6 +40,10 @@ public static <K, V> Map<K, V> defaultIfNull(Map<K, V> source, Supplier<Map<K, V
3140

3241
/**
3342
* If the source param is null, return the default value.
43+
* @param source maybe null object
44+
* @param defaultValue thing to use if source is null
45+
* @param <T> type
46+
* @return resulting object
3447
*/
3548
public static <T> T defaultIfNull(T source, Supplier<T> defaultValue) {
3649
if (source == null) {
@@ -41,6 +54,9 @@ public static <T> T defaultIfNull(T source, Supplier<T> defaultValue) {
4154

4255
/**
4356
* Concatenate a bunch of lists.
57+
* @param sources bunch of lists.
58+
* @param <T> list type
59+
* @return resulting object
4460
*/
4561
@SafeVarargs
4662
public static <T> List<T> merge(List<T>... sources) {

0 commit comments

Comments
 (0)