|
|
|
@ -132,7 +132,7 @@ public class TemplateUtils {
|
|
|
|
|
|
|
|
|
|
private static void createAndOpenTemplate0(FILE file, String oldPath, boolean createByEditingTemplate, boolean openNewTemplate, @Nullable JTemplate<?, ?> template) { |
|
|
|
|
|
|
|
|
|
CompletableFuture.supplyAsync(() -> { |
|
|
|
|
CompletableFuture<Boolean> createTemplate = CompletableFuture.supplyAsync(() -> { |
|
|
|
|
try { |
|
|
|
|
// 读取模板数据
|
|
|
|
|
byte[] content = getTemplateData(createByEditingTemplate, oldPath); |
|
|
|
@ -162,7 +162,9 @@ public class TemplateUtils {
|
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}).thenApply((Function<Boolean, Void>) aBoolean -> { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
createTemplate.thenApply((Function<Boolean, Void>) aBoolean -> { |
|
|
|
|
if (!aBoolean) { |
|
|
|
|
//备份失败直接返回
|
|
|
|
|
return null; |
|
|
|
|