Skip to content

Commit

Permalink
may throw null point exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhou Wei authored Nov 2, 2016
1 parent ec17266 commit 70c5b8e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
Expand Down

0 comments on commit 70c5b8e

Please sign in to comment.