-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
None
-
2020 Week 28-30 (from Jul 6)
-
NEW
-
NEW
org.drools.compiler.kie.builder.impl.InternalKieModule.createKieModule(ReleaseId releaseId, File jar)
has a couple of issues
1) there is not a check on the actual type of File received as parameter: it expects it to be a "jar" - but this is not checked anywhere - so
ZipFile zipFile = new ZipFile(jar)
throws an exception whenever the given file is not a "jar"
2) every exceptions are catch and simply logged; but it seems that whatever exception may happen inside this if
if (zipEntry != null) { KieModuleModel kieModuleModel = KieModuleModelImpl.fromXML( zipFile.getInputStream( zipEntry ) ); setDefaultsforEmptyKieModule( kieModuleModel ); return kieModuleModel != null ? InternalKieModuleProvider.get( adapt( releaseId ), kieModuleModel, jar ) : null; }
it is actually a grave exception, since it means that it was impossible to retrieve an expected KieModule out of a given "kjar" (we know it is a kjar because zipEntry != null)