String property = (String) args[0]; CpsScript script = (CpsScript) receiver; Run<?,?> b = script.$buildNoException(); if (GlobalVariable.byName(property, b) != null) { return true;
GlobalVariable v = GlobalVariable.byName(name, $buildNoException()); if (v != null) { try {
@Override public Object getProperty(String property) { try { return super.getProperty(property); } catch (MissingPropertyException mpe) { // cf. CpsWhitelist.permitsMethod Run<?,?> b = $buildNoException(); GlobalVariable v = GlobalVariable.byName(property, b); if (v != null) { try { return v.getValue(this); } catch (Exception x) { throw new InvokerInvocationException(x); } } if (b != null) { try { String value = EnvActionImpl.forRun(b).getProperty(property); if (value != null) { return value; } } catch (IOException x) { LOGGER.log(Level.WARNING, null, x); } } throw mpe; } }