fix: switch-выражение из super() вынесено в статический message()
PR checks / web (pull_request) Successful in 30s
PR checks / java (pull_request) Successful in 1m5s
Main: tests, deploy, autotests / web (push) Successful in 31s
Main: tests, deploy, autotests / java (push) Successful in 1m4s
Main: tests, deploy, autotests / images-web (push) Successful in 30s
Main: tests, deploy, autotests / images-app (push) Successful in 47s
Main: tests, deploy, autotests / deploy (push) Successful in 1m31s
Main: tests, deploy, autotests / autotests (push) Successful in 40s
Main: tests, deploy, autotests / rollback (push) Has been skipped
PR checks / web (pull_request) Successful in 30s
PR checks / java (pull_request) Successful in 1m5s
Main: tests, deploy, autotests / web (push) Successful in 31s
Main: tests, deploy, autotests / java (push) Successful in 1m4s
Main: tests, deploy, autotests / images-web (push) Successful in 30s
Main: tests, deploy, autotests / images-app (push) Successful in 47s
Main: tests, deploy, autotests / deploy (push) Successful in 1m31s
Main: tests, deploy, autotests / autotests (push) Successful in 40s
Main: tests, deploy, autotests / rollback (push) Has been skipped
Парсер PMD 7.17 (движок maven-pmd-plugin 3.28.0) не разбирает switch-выражение в аргументе super (pmd/pmd#6234) — при verify каждый модуль давал PMD processing error (warning). Сообщения не меняются: текст 422-контракта и ядра дословно прежние.
This commit was merged in pull request #66.
This commit is contained in:
@@ -13,10 +13,16 @@ import ru.pjandro.wordpdf.DrawingFoundException;
|
||||
class DrawingRejectedException extends RuntimeException {
|
||||
|
||||
DrawingRejectedException(DrawingFoundException.Kind kind) {
|
||||
super(switch (kind) {
|
||||
super(message(kind));
|
||||
}
|
||||
|
||||
// switch вынесен из super(): парсер PMD 7.17 (движок maven-pmd-plugin)
|
||||
// падает на switch-выражении в аргументе super (pmd/pmd#6234).
|
||||
private static String message(DrawingFoundException.Kind kind) {
|
||||
return switch (kind) {
|
||||
case CHARTS -> "Конвертация отменена: в документе найдены диаграммы";
|
||||
case SMARTART -> "Конвертация отменена: в документе найден SmartArt";
|
||||
case OLE -> "Конвертация отменена: в документе найдены OLE-объекты";
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user