This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new 10eaa09  Deploy manager quick fix.
10eaa09 is described below

commit 10eaa09a9137d4ea41686325e50fe089bb639739
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Aug 24 16:00:07 2021 +0300

    Deploy manager quick fix.
---
 .../org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index 02939d3..fddc682 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -1669,6 +1669,10 @@ object NCDeployManager extends NCService {
             CLS_MDL_PKGS_REF,
             (a: NCModelAddPackage) =>
                 a.value().toIndexedSeq.flatMap(p => {
+                    //noinspection UnstableApiUsage
+                    val res = 
ClassPath.from(cl).getTopLevelClassesRecursive(p).asScala.map(_.load())
+
+                    // Check should be after classes loading attempt.
                     if (cl.getDefinedPackage(p) == null)
                         throw new NCE(
                             s"Invalid additional references in 
@${CLS_MDL_PKGS_REF.getSimpleName} annotation [" +
@@ -1678,8 +1682,7 @@ object NCDeployManager extends NCService {
                             s"]"
                         )
 
-                    //noinspection UnstableApiUsage
-                    
ClassPath.from(cl).getTopLevelClassesRecursive(p).asScala.map(_.load())
+                    res
                 })
         )
 

Reply via email to