From 70c5b8e5db9522f8b30c7ebd7cade8e3e21961a9 Mon Sep 17 00:00:00 2001 From: Zhou Wei Date: Wed, 2 Nov 2016 14:50:24 +0800 Subject: [PATCH] may throw null point exception --- .../jeesite/modules/act/service/ActProcessService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/thinkgem/jeesite/modules/act/service/ActProcessService.java b/src/main/java/com/thinkgem/jeesite/modules/act/service/ActProcessService.java index 2db8f52d66..719903ecc0 100644 --- a/src/main/java/com/thinkgem/jeesite/modules/act/service/ActProcessService.java +++ b/src/main/java/com/thinkgem/jeesite/modules/act/service/ActProcessService.java @@ -138,7 +138,7 @@ public String deploy(String exportDir, String category, MultipartFile file) { try { InputStream fileInputStream = file.getInputStream(); - Deployment deployment = null; + Deployment deployment; String extension = FilenameUtils.getExtension(fileName); if (extension.equals("zip") || extension.equals("bar")) { ZipInputStream zip = new ZipInputStream(fileInputStream); @@ -152,6 +152,7 @@ public String deploy(String exportDir, String category, MultipartFile file) { deployment = repositoryService.createDeployment().addInputStream(baseName + ".bpmn20.xml", fileInputStream).deploy(); } else { message = "不支持的文件类型:" + extension; + return message; } List list = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();