Commit be5fc116 authored by samz406's avatar samz406 Committed by bao liang
Browse files

update resource may NPE (#1610)

* misspell  words

* modify common queue TaskQueueZKImplTest.java unit test

* extends  BaseTaskQueueTest get zkServer

* modify zk config

* update resource may NPE
parent 7f27c8a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,6 @@ public class ResourcesService extends BaseService {
        }

        Resource resource = resourcesMapper.selectById(resourceId);
        String originResourceName = resource.getAlias();
        if (resource == null) {
            putMsg(result, Status.RESOURCE_NOT_EXIST);
            return result;
@@ -236,6 +235,7 @@ public class ResourcesService extends BaseService {
        }

        //get the file suffix
        String originResourceName = resource.getAlias();
        String suffix = originResourceName.substring(originResourceName.lastIndexOf("."));

        //if the name without suffix then add it ,else use the origin name