update for java 8 (nashorn javascript engine)

This commit is contained in:
Peter Hormanns 2017-12-21 19:08:31 +01:00
parent ea0b1112e8
commit ae7bd7abb9
2 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>hsadmin-cli</artifactId>
<version>1.0.4</version>
<version>1.1.0</version>
<packaging>jar</packaging>
<name>HSAdmin-Cli</name>

View File

@ -1,5 +1,5 @@
importClass(java.util.ArrayList);
importClass(java.util.HashMap);
var JArrayList = Java.type("java.util.ArrayList")
var JHashMap = Java.type("java.util.HashMap")
function hsaParseParam(val) {
if (val === null) {
@ -20,7 +20,7 @@ function hsaParseParam(val) {
}
function hsaParseParamArray(o) {
var lst = new ArrayList();
var lst = new JArrayList();
var val = '';
for (var idx=0; idx < o.length; idx++) {
val = o[idx];
@ -36,7 +36,7 @@ function hsaParseParamArray(o) {
}
function hsaParseParamObject(o) {
var hsh = new HashMap();
var hsh = new JHashMap();
for (var key in o) {
var val = o[key];
if (!val === null) {
@ -73,7 +73,7 @@ function hsaToNativeJSObject(val) {
}
function hsaModuleCall(mod, fct, json) {
var params = new ArrayList();
var params = new JArrayList();
params.add(casgrantingticket.getRunAs());
params.add(casgrantingticket.getTicket());
if (typeof json === "undefined") {