Skip to content

Commit

Permalink
Merge pull request thinkgem#341 from zzguiji/master
Browse files Browse the repository at this point in the history
may throw null point exception
  • Loading branch information
think-gem authored Dec 31, 2016
2 parents 604d091 + 70c5b8e commit 8fcdf70
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 8fcdf70

Please sign in to comment.