Java/JavaScript: Add two deprecated predicates to XML.qll.

This makes XML.qll identical across C++, Java, JavaScript and Python.
This commit is contained in:
Max Schaefer
2019-12-17 08:55:15 +00:00
parent a17b615ae5
commit 09ee106333
2 changed files with 28 additions and 0 deletions

View File

@@ -117,6 +117,20 @@ class XMLFile extends XMLParent, File {
/** Gets the name of this XML file. */
override string getName() { result = File.super.getAbsolutePath() }
/**
* DEPRECATED: Use `getAbsolutePath()` instead.
*
* Gets the path of this XML file.
*/
deprecated string getPath() { result = getAbsolutePath() }
/**
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
*
* Gets the path of the folder that contains this XML file.
*/
deprecated string getFolder() { result = getParentContainer().getAbsolutePath() }
/** Gets the encoding of this XML file. */
string getEncoding() { xmlEncoding(this, result) }