Skip to content

Commit 7e1ec92

Browse files
committed
prevent TEG from loading abstract components
1 parent 3c5f833 commit 7e1ec92

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>org.lucee</groupId>
66
<artifactId>tasks-extension</artifactId>
7-
<version>1.1.0.2-RC</version>
7+
<version>1.1.0.3-SNAPSHOT</version>
88
<packaging>pom</packaging>
99
<name>Tasks Extension</name>
1010

source/components/org/lucee/cfml/TasksGatewayImpl.cfc

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,24 @@ component {
642642
el.id=hash(fullName,"quick");
643643
try {
644644
inspectTemplates();}catch(e) {pagePoolClear();} // older Lucee version do not support inspectTemplates...
645-
local.cfc=isSimpleValue(rawData)?createObject("component",el.name):new TaskForScheduler(el.name,rawData.properties); // we do here not new to avoid the init method
646-
if(!isSimpleValue(rawData))el.properties=rawData.properties;
647-
el.meta=getMetadata(cfc);
645+
if(isSimpleValue(rawData)) {
646+
el.meta=getComponentMetadata(el.name);
647+
if(el.meta.abstract?:false) {
648+
// we do this so this component get not get checked all the time
649+
el.type="other";
650+
continue;
651+
}
652+
local.cfc=createObject("component",el.name); // we do here not new to avoid the init method
653+
}
654+
else {
655+
local.cfc=new TaskForScheduler(el.name,rawData.properties);
656+
el.properties=rawData.properties;
657+
}
658+
659+
if(isNull(el.meta)) {
660+
el.meta=getMetadata(cfc);
661+
}
662+
648663
// it is allowed to have none task/listener in the package, but they simply get ignored
649664

650665
if(IsInstanceOf(cfc, "org.lucee.cfml.Task")) {

0 commit comments

Comments
 (0)