commit | c218bfaa7c8b2d25d620e9ee92839528748bd778 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Thu Aug 18 14:22:50 2016 -0700 |
committer | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Mon Aug 29 11:07:55 2016 -0700 |
tree | 47b93f9f422dcab09a1733a13b85f2b14236dc64 | |
parent | e4ba2a446093dfd9171201839ca773084c096cf0 [diff] |
Check equality of String with equals(), not "==" Change-Id: I0113edf6161d97578b2f21c3db21c7bcbd8fdce6
diff --git a/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java b/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java index f9740b5..f821f21 100644 --- a/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java +++ b/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java
@@ -128,6 +128,7 @@ import java.util.LinkedList; import java.util.List; import java.util.ListIterator; +import java.util.Objects; import java.util.Optional; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; @@ -841,7 +842,7 @@ */ private String getPcepTunnelKey(TunnelId tunnelId) { for (String key : tunnelMap.keySet()) { - if (tunnelMap.get(key).id() == tunnelId.id()) { + if (Objects.equals(tunnelMap.get(key).id(), tunnelId.id())) { return key; } }