Alternative to Nashorn engine for Scripts?

Hello,
I started to use Script Mapper to get an attribute value of every group the user joined. I followed the instructions in the documentation https://www.keycloak.org/docs/latest/server_development/#_script_providers.
To use the script I’ve set -Dkeycloak.profile.feature.scripts=enabled

My Mapper is looking simular to this:

var ArrayList = Java.type("java.util.ArrayList");
var repository_claims = new ArrayList();

user.getGroups().forEach(function (groupModel) {
    var something= groupModel.getFirstAttribute("the attribute name");
    if (something&& !repository_claims.contains(something)) {
        repository_claims.add(parseInt(locId));
    }
});

exports = repository_claims;

Now the console is printing

Warning: Nashorn engine is planned to be removed from a future JDK release

Do I have to change something or is there another way to do this?
How can I make sure my scripts are not deprecated soon?

Keeping it up, what’s the plan for this?
Will javascript policies be deprecated in some way? (i hope no)

thanks!

Standalone Nashorn is coming back - as an add-on!