Validate the class can be parsed by ASM. @param value Class bytecode. @return true when the class can be read by ASM.
(byte[] value)
| 410 | * @return {@code true} when the class can be read by ASM. |
| 411 | */ |
| 412 | public static boolean isValidClass(byte[] value) { |
| 413 | if (!isClass(value)) |
| 414 | return false; |
| 415 | try { |
| 416 | getNode(new ClassReader(value), SKIP_FRAMES); |
| 417 | return true; |
| 418 | } catch(Throwable t) { |
| 419 | return false; |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | } |
no test coverage detected