@Test public void testUntrustedJavaConsequence() throws Exception { try { MVELSafeHelper.getEvaluator().eval("System.exit(0);"); Assert.fail("Should have raised an exception..."); } catch (ShouldHavePrevented e) { Assert.fail("The security policy for the rule should have prevented this from executing..."); } catch (PropertyAccessException e) { } }
public static MVELEvaluator getEvaluator() { return MVELEvaluatorHolder.evaluator; }
MVELSafeHelper { public static MVELEvaluator getEvaluator() { return MVELEvaluatorHolder.evaluator; } }
MVELSafeHelper { public static MVELEvaluator getEvaluator() { return MVELEvaluatorHolder.evaluator; } private  MVELSafeHelper(); }
MVELSafeHelper { public static MVELEvaluator getEvaluator() { return MVELEvaluatorHolder.evaluator; } private  MVELSafeHelper(); static MVELEvaluator getEvaluator(); }
MVELSafeHelper { public static MVELEvaluator getEvaluator() { return MVELEvaluatorHolder.evaluator; } private  MVELSafeHelper(); static MVELEvaluator getEvaluator();  }