Method
isCoercibleFrom
(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 | /* |
Tested by
no test coverage detected