This is an automated email from the ASF dual-hosted git repository. sergeykamov pushed a commit to branch NLPCRAFT-504 in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 8d7dce5286ccfeb31c51ce7f34de71a584715ec9 Author: Sergey Kamov <[email protected]> AuthorDate: Sat Jul 2 13:27:10 2022 +0300 Minot fix. --- nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipelineBuilder.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipelineBuilder.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipelineBuilder.scala index f12229e8..7989755d 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipelineBuilder.scala +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipelineBuilder.scala @@ -187,6 +187,7 @@ class NCPipelineBuilder: * @return */ def withSemantic(lang: String, macros: Map[String, String], elms: List[NCSemanticElement]): NCPipelineBuilder = Objects.requireNonNull(lang, "Language cannot be null.") + Objects.requireNonNull(macros, "Macros elements cannot be null.") Objects.requireNonNull(elms, "Model elements cannot be null.") if elms.isEmpty then throw new IllegalArgumentException("Model elements cannot be empty.") @@ -202,7 +203,7 @@ class NCPipelineBuilder: * @param lang * @param elms * @return */ - def withSemantic(lang: String, elms: List[NCSemanticElement]): NCPipelineBuilder = withSemantic(lang, null, elms) + def withSemantic(lang: String, elms: List[NCSemanticElement]): NCPipelineBuilder = withSemantic(lang, Map.empty, elms) /** *
