ConditionalExpression ConditionalExpr = (ConditionalExpression) expr; Object expression = evalExpr( ConditionalExpr.getExpression( ), cx, scope, source, lineNo ); Object Op1 = evalExpr( MiscUtil.constructValidScriptExpression ( ConditionalExpr.getOperand1() ), cx, scope, source, lineNo ); Object Op2 = evalExpr( MiscUtil.constructValidScriptExpression ( ConditionalExpr.getOperand2() ), cx, scope, source, lineNo ); result = evalConditionalExpr2( expression, ConditionalExpr.getOperator( ), Op1, Op2 );
Object handle = expr.getHandle(); if ( handle instanceof NEvaluator ) { result =  Boolean.valueOf (((NEvaluator)handle).evaluate( cx, scope )); } else { ConditionalExpression ConditionalExpr = (ConditionalExpression) expr; Object expression = evalExpr( ConditionalExpr.getExpression( ), cx, scope, source, lineNo ); Object Op1 = evalExpr( MiscUtil.constructValidScriptExpression ( ConditionalExpr.getOperand1() ), cx, scope, source, lineNo ); Object Op2 = evalExpr( MiscUtil.constructValidScriptExpression ( ConditionalExpr.getOperand2() ), cx, scope, source, lineNo ); result = evalConditionalExpr2( expression, ConditionalExpr.getOperator( ), Op1, Op2 ); }
	public static Object evalExpr( IBaseExpression expr, Context cx, Scriptable scope, 				String source, int lineNo )		throws DataException	{		if ( logger.isLoggable( Level.FINER ) )			logger.entering( ScriptEvalUtil.class.getName( ),				"evalExpr",				"evalExpr() expr="						+ LogUtil.toString( expr ) + ", source=" + source						+ ", lineNo=" + lineNo );		Object result;		if ( expr == null )		{			result = null;		}		else if ( expr instanceof IConditionalExpression)		{			ConditionalExpression ConditionalExpr = (ConditionalExpression) expr;			Object expression = evalExpr( ConditionalExpr.getExpression( ), cx, scope, source, lineNo );			Object Op1 = evalExpr( MiscUtil.constructValidScriptExpression ( ConditionalExpr.getOperand1() ), cx, scope, source, lineNo );			Object Op2 = evalExpr( MiscUtil.constructValidScriptExpression ( ConditionalExpr.getOperand2() ), cx, scope, source, lineNo );			result = evalConditionalExpr2( expression, ConditionalExpr.getOperator( ), Op1, Op2 ); 		}		else		{			IScriptExpression jsExpr = (IScriptExpression) expr;			if ( jsExpr.getText( ) != null && jsExpr.getHandle( ) != null )			{				result = ((CompiledExpression) jsExpr.getHandle( ) ).evaluate( cx, scope );			}			else			{				result = evaluateJSAsExpr( cx,						scope,						jsExpr.getText( ),						source,						lineNo );			}		}				if ( logger.isLoggable( Level.FINER ) )			logger.exiting( ScriptEvalUtil.class.getName( ),					"evalExpr",					result );		return result;	}	