(ELContext context, Object src, Class<?> target)
| 402 | * This method duplicates code in org.apache.el.util.ReflectionUtil. When making changes keep the code in sync. |
| 403 | */ |
| 404 | private static boolean isCoercibleFrom(ELContext context, Object src, Class<?> target) { |
| 405 | /* |
| 406 | * TODO: This isn't pretty but it works. Significant refactoring would be required to avoid the exception. See |
| 407 | * also OptionalELResolver.convertToType(). |
| 408 | */ |
| 409 | try { |
| 410 | context.convertToType(src, target); |
| 411 | } catch (ELException e) { |
| 412 | return false; |
| 413 | } |
| 414 | return true; |
| 415 | } |
| 416 | |
| 417 | |
| 418 | private static Class<?>[] getTypesFromValues(Object[] values) { |
no test coverage detected