private static void setScriptVarImpl ( String scriptName , String key , String value ) { validateKey ( key ) ; Map < String , String > scVars = scriptVars . computeIfAbsent ( scriptName , k -> Collections . synchronizedMap ( new HashMap < String , String > ( ) ) ) ; if ( value == null ) { scVars . remove ( key ) ; } else { validateValueLength ( value ) ; if ( scVars . size ( ) > MAX_SCRIPT_VARS ) { throw new IllegalArgumentException ( "Maximum number of script variables reached: " + MAX_SCRIPT_VARS ) ; } scVars . put ( key , value ) ; } }
Internal method that sets a variable without validating the script name .