Skip to content

Commit a8ec6ec

Browse files
committed
Use CdlService.getImplementation instead of duplicating logic
There is a performance issue with getCdsDeclaration, so ensure we're using a single definition.
1 parent c3d6d1c commit a8ec6ec

File tree

1 file changed

+1
-7
lines changed
  • javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap

1 file changed

+1
-7
lines changed

javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap/CDS.qll

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,7 @@ abstract class UserDefinedApplicationService extends UserDefinedService {
442442
/**
443443
* Gets the CDS definition of this service.
444444
*/
445-
CdlService getCdsDeclaration() {
446-
exists(CdsFile cdsFile |
447-
cdsFile.getStem() = this.getFile().getStem() + ".cds" and
448-
cdsFile.getParentContainer() = this.getFile().getParentContainer() and
449-
result.getFile() = cdsFile
450-
)
451-
}
445+
CdlService getCdsDeclaration() { result.getImplementation() = this }
452446

453447
/**
454448
* Gets the name of this service.

0 commit comments

Comments
 (0)