(Path file, ZapAddOnXmlFile manifest, ZipFile zip)
| 424 | } |
| 425 | |
| 426 | private static boolean hasInvalidLibs(Path file, ZapAddOnXmlFile manifest, ZipFile zip) { |
| 427 | return manifest.getLibs().stream() |
| 428 | .anyMatch( |
| 429 | e -> { |
| 430 | ZipEntry libEntry = zip.getEntry(e); |
| 431 | if (libEntry == null) { |
| 432 | LOGGER.warn("The add-on {} does not have the lib: {}", file, e); |
| 433 | return true; |
| 434 | } |
| 435 | if (libEntry.isDirectory()) { |
| 436 | LOGGER.warn("The add-on {} does not have a file lib: {}", file, e); |
| 437 | return true; |
| 438 | } |
| 439 | return false; |
| 440 | }); |
| 441 | } |
| 442 | |
| 443 | /** |
| 444 | * Convenience method that attempts to create an {@code AddOn} from the given file. |
no test coverage detected