Skip to content

Commit

Permalink
Update JsoupConverter.java
Browse files Browse the repository at this point in the history
Java <11 compatibility
  • Loading branch information
sam-hieken authored Sep 25, 2023
1 parent 9f8e52f commit 7991ea5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/jsoup/experimental/JsoupConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private <T> T getObjectFromElement0(Element elem, Class<T> type) throws IllegalA
if (ja != null) {
// If the selector is blank, we use attributes from
// the root element.
final Element child = ja.selector().isBlank()
final Element child = ja.selector().isEmpty()
? elem
: elem.selectFirst(ja.selector());

Expand Down Expand Up @@ -182,7 +182,7 @@ else if (fieldType == List.class || fieldType == Set.class) {
if (jselector == null)
throw new IllegalArgumentException("Field '" + field.getName() + "' is a collection, and can't be assigned by a @JAttribute");

final String selector = jselector.value().isBlank()
final String selector = jselector.value().isEmpty()
? field.getName()
: jselector.value();

Expand All @@ -198,7 +198,7 @@ else if (fieldType == List.class || fieldType == Set.class) {
if (jselector == null)
throw new IllegalArgumentException("Field '" + field.getName() + "' is not a primitive, and can't be assigned by a @JAttribute");

final String selector = jselector.value().isBlank()
final String selector = jselector.value().isEmpty()
? field.getName()
: jselector.value();

Expand Down

0 comments on commit 7991ea5

Please sign in to comment.