Skip to content

Commit a8e85e3

Browse files
committed
Fix Android incompatibility
1 parent 9c30a1e commit a8e85e3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/nibor/autolink/LinkExtractor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ private Builder() {
6666
* @return this builder
6767
*/
6868
public Builder linkTypes(Set<LinkType> linkTypes) {
69-
this.linkTypes = new HashSet<>(Objects.requireNonNull(linkTypes, "linkTypes must not be null"));
69+
if (linkTypes == null) {
70+
throw new NullPointerException("linkTypes must not be null");
71+
}
72+
this.linkTypes = new HashSet<>(linkTypes);
7073
return this;
7174
}
7275

0 commit comments

Comments
 (0)