View | Details | Raw Unified | Return to bug 31789
Collapse All | Expand All

(-)src/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java (-11 / +14 lines)
Lines 259-265 Link Here
259
      ELParser parser = new ELParser (r);
259
      ELParser parser = new ELParser (r);
260
      try {
260
      try {
261
	ret = parser.ExpressionString ();
261
	ret = parser.ExpressionString ();
262
	sCachedExpressionStrings.put (pExpressionString, ret);
262
	if (mBypassCache == false) 
263
	    sCachedExpressionStrings.put (pExpressionString, ret);
263
      }
264
      }
264
      catch (ParseException exc) {
265
      catch (ParseException exc) {
265
	throw new ELException 
266
	throw new ELException 
Lines 310-326 Link Here
310
    }
311
    }
311
312
312
    // Find the cached value
313
    // Find the cached value
313
    Map valueByString = getOrCreateExpectedTypeMap (pExpectedType);
314
    Map valueByString = null;
314
    if (!mBypassCache &&
315
    
315
	valueByString.containsKey (pValue)) {
316
    if (!mBypassCache) {
316
      return valueByString.get (pValue);
317
        valueByString = getOrCreateExpectedTypeMap (pExpectedType);
318
	if (valueByString.containsKey (pValue)) {
319
	    return valueByString.get (pValue);
320
	}
317
    }
321
    }
318
    else {
322
    // Convert from a String
319
      // Convert from a String
323
    Object ret = Coercions.coerce (pValue, pExpectedType, pLogger);
320
      Object ret = Coercions.coerce (pValue, pExpectedType, pLogger);
324
    if (!mBypassCache) 
321
      valueByString.put (pValue, ret);
325
	valueByString.put (pValue, ret);
322
      return ret;
326
    return ret;
323
    }
324
  }
327
  }
325
328
326
  //-------------------------------------
329
  //-------------------------------------
(-)src/org/apache/taglibs/standard/lang/jstl/Evaluator.java (-1 / +1 lines)
Lines 53-59 Link Here
53
  /** The singleton instance of the evaluator **/
53
  /** The singleton instance of the evaluator **/
54
  static ELEvaluator sEvaluator =
54
  static ELEvaluator sEvaluator =
55
    new ELEvaluator
55
    new ELEvaluator
56
    (new JSTLVariableResolver ());
56
    (new JSTLVariableResolver (), Boolean.getBoolean("org.apache.taglibs.standard.elevaluator.mBypassCache"));
57
57
58
  //-------------------------------------
58
  //-------------------------------------
59
  // ExpressionEvaluator methods
59
  // ExpressionEvaluator methods

Return to bug 31789