diff --git a/src/main/.checkstyle_checks.xml b/src/main/.checkstyle_checks.xml index a4be9d466c0c..7e3549e28180 100644 --- a/src/main/.checkstyle_checks.xml +++ b/src/main/.checkstyle_checks.xml @@ -195,15 +195,19 @@ - + - + - + + + + + diff --git a/src/main/java/org/truffleruby/parser/ast/ArgsParseNode.java b/src/main/java/org/truffleruby/parser/ast/ArgsParseNode.java index 81fb62443ce8..ae11809b9d1d 100644 --- a/src/main/java/org/truffleruby/parser/ast/ArgsParseNode.java +++ b/src/main/java/org/truffleruby/parser/ast/ArgsParseNode.java @@ -38,6 +38,7 @@ import java.util.Arrays; import java.util.List; +import org.truffleruby.core.string.StringUtils; import org.truffleruby.language.SourceIndexLength; import org.truffleruby.language.methods.Arity; import org.truffleruby.parser.Helpers; @@ -153,7 +154,7 @@ private Arity createArity() { final List keywords = new ArrayList<>(requiredKeywords); keywords.addAll(optionalKeywords); - keywordArguments = keywords.toArray(String[]::new); + keywordArguments = keywords.toArray(StringUtils.EMPTY_STRING_ARRAY); requiredKeywordArgumentsCount = requiredKeywords.size(); } else { keywordArguments = Arity.NO_KEYWORDS;