MCPcopy Index your code
hub / github.com/apache/tomcat / isCoercibleFrom

Method isCoercibleFrom

java/org/apache/el/util/ReflectionUtil.java:454–462  ·  view source on GitHub ↗
(EvaluationContext ctx, Object src, Class<?> target)

Source from the content-addressed store, hash-verified

452 * This class duplicates code in jakarta.el.Util. When making changes keep the code in sync.
453 */
454 private static boolean isCoercibleFrom(EvaluationContext ctx, Object src, Class<?> target) {
455 // TODO: This isn't pretty but it works. Significant refactoring would be required to avoid the exception.
456 try {
457 ELSupport.coerceToType(ctx, src, target);
458 } catch (ELException e) {
459 return false;
460 }
461 return true;
462 }
463
464
465 /*

Callers 1

getMethodMethod · 0.95

Calls 1

coerceToTypeMethod · 0.95

Tested by

no test coverage detected