commit | 8f6281e836009313ed2a863c1d8be254d461251c | [log] [tgz] |
---|---|---|
author | 柯志勇10068695 <ke.zhiyong@zte.com.cn> | Fri Oct 19 17:33:17 2018 +0800 |
committer | Ray Milkey <ray@opennetworking.org> | Fri Oct 19 14:53:46 2018 +0000 |
tree | 858f6c52b3b234c3a7a9d3210beae4f84e6212bd | |
parent | 66c9ec1bed91ef51617edd626ec4677f2aea79f3 [diff] |
If path is empty but not null, The following code may be error. Change-Id: I58a16c6a65a8cfe1786465fe8f2139bf57adda96
diff --git a/app/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelHandler.java b/app/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelHandler.java index fe65e6e..99ff091 100644 --- a/app/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelHandler.java +++ b/app/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelHandler.java
@@ -495,7 +495,7 @@ // get path here, need to use the same for fwd and rev direction List<Link> path = getPath(pw.l2TunnelPolicy().cP1(), pw.l2TunnelPolicy().cP2()); - if (path == null) { + if (path == null || path.isEmpty()) { log.error("Deploying process : No path between the connection points for pseudowire {}", l2TunnelId); return PATH_NOT_FOUND.appendError("No path between the connection points for pseudowire!"); }