fix(core): DependencyGuard — понятная ошибка при старой commons-compress у потребителя
PR checks / web (pull_request) Successful in 49s
PR checks / java (pull_request) Successful in 1m2s
Main: tests, deploy, autotests / web (push) Successful in 44s
Main: tests, deploy, autotests / java (push) Successful in 57s
Main: tests, deploy, autotests / images-web (push) Successful in 30s
Main: tests, deploy, autotests / images-app (push) Successful in 5m12s
Main: tests, deploy, autotests / deploy (push) Successful in 1m34s
Main: tests, deploy, autotests / autotests (push) Successful in 49s
Main: tests, deploy, autotests / rollback (push) Has been skipped
PR checks / web (pull_request) Successful in 49s
PR checks / java (pull_request) Successful in 1m2s
Main: tests, deploy, autotests / web (push) Successful in 44s
Main: tests, deploy, autotests / java (push) Successful in 57s
Main: tests, deploy, autotests / images-web (push) Successful in 30s
Main: tests, deploy, autotests / images-app (push) Successful in 5m12s
Main: tests, deploy, autotests / deploy (push) Successful in 1m34s
Main: tests, deploy, autotests / autotests (push) Successful in 49s
Main: tests, deploy, autotests / rollback (push) Has been skipped
docx4j 17.3.2 требует ковариантный ZipArchiveInputStream.getNextEntry() (>= 1.25.0); BOM/nearest-wins потребителя мог навязать старую версию — конвертация падала NoSuchMethodError внутри docx4j. Теперь шаг 0 convertToStream бросает ConversionException с инструкцией; commons-compress объявлена явной зависимостью ядра (1.28.0, версия docx4j); README — закрепление версии в Maven/Gradle. Регрессия — DependencyGuardTest, негативная ветка проверена подменой jar (1.21 → ConversionException).
This commit was merged in pull request #56.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package ru.pjandro.wordpdf.internal;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
/**
|
||||
* Guard на тестовом classpath (commons-compress 1.28.0) — no-op.
|
||||
* Негативная ветка (старая версия jar) surefire-покрытию недоступна — одна
|
||||
* версия jar на classpath; проверена эмпирически подменой jar в classpath
|
||||
* прогона (1.21 → ConversionException, 1.25.0/1.28.0 → OK).
|
||||
*/
|
||||
class DependencyGuardTest {
|
||||
|
||||
@Test
|
||||
void checkPassesOnCurrentClasspath() {
|
||||
assertDoesNotThrow(DependencyGuard::check);
|
||||
}
|
||||
|
||||
@Test
|
||||
void reasonNullOnCurrentClasspath() {
|
||||
assertNull(DependencyGuard.incompatibleReason());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user