]> git.basschouten.com Git - openhab-addons.git/commit
[jsscripting] Add an alternative MIME type/alias (#13851)
authorFlorian Hotze <florianh_dev@icloud.com>
Mon, 5 Dec 2022 17:40:15 +0000 (18:40 +0100)
committerGitHub <noreply@github.com>
Mon, 5 Dec 2022 17:40:15 +0000 (18:40 +0100)
commit54b2772df4deb46f36e276b4801445514d29b200
treee8253e331dbe72403fa942f3e9e1645794dc4ab8
parent52b7b7981f262cc6e98cf2d630012565a0a51ac9
[jsscripting] Add an alternative MIME type/alias (#13851)

The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type.
The alias is introduced to simplify the usage in SCRIPT transformation profiles.

* Fix syntax problems in the bndtools file
* Add null check to avoid potential NPE
  In some cases during testing, a NPE occured, this should solve it.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
bundles/org.openhab.automation.jsscripting/bnd.bnd
bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/GraalJSScriptEngineFactory.java
bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java