Exemplo n.º 1
0
  private cfTagReturnType renderOptimzedSwitch(String expr, cfSession _Session)
      throws cfmRunTimeException {
    cfCASE thisCase = (cfCASE) caseMap.get(expr);
    cfTagReturnType rt = null;

    if (thisCase != null) {
      _Session.pushTag(thisCase);
      rt = thisCase.render(_Session);
    } else if (defaultCase != null) {
      _Session.pushTag(defaultCase);
      rt = defaultCase.render(_Session);
    } else {
      // we didn't do anything, so don't invoke _Session.popTag() or return rt
      return cfTagReturnType.NORMAL;
    }

    _Session.popTag();
    return rt;
  }