Skip to content

Commit

Permalink
return empty immutable list if option attribute could not be found
Browse files Browse the repository at this point in the history
  • Loading branch information
ancho committed Mar 8, 2021
1 parent 9ab23dd commit 4d32d38
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -10,6 +10,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
Expand Down Expand Up @@ -96,7 +97,7 @@ public List<String> getAsciidoctorOption(String optionKey) {
return subConfig.getList(String.class, optionKey);
} else {
logger.warn("Cannot find asciidoctor option '{}.{}'", JBakeProperty.ASCIIDOCTOR_OPTION, optionKey);
return new ArrayList<>();
return Collections.emptyList();
}
}

Expand Down

0 comments on commit 4d32d38

Please sign in to comment.