Sho SHIMIZU

Use equals() for comparison of String

Change-Id: I825ed37f0aec36d6c7f7de96953de6b80a8802b3
...@@ -28,6 +28,8 @@ import org.onosproject.net.device.DefaultDeviceDescription; ...@@ -28,6 +28,8 @@ import org.onosproject.net.device.DefaultDeviceDescription;
28 import org.onosproject.net.device.DeviceDescription; 28 import org.onosproject.net.device.DeviceDescription;
29 import org.slf4j.Logger; 29 import org.slf4j.Logger;
30 30
31 +import java.util.Objects;
32 +
31 /** 33 /**
32 * Implementations of merge policies for various sources of device configuration 34 * Implementations of merge policies for various sources of device configuration
33 * information. This includes applications, provides, and network configurations. 35 * information. This includes applications, provides, and network configurations.
...@@ -73,7 +75,7 @@ public final class BasicDeviceOperator implements ConfigOperator { ...@@ -73,7 +75,7 @@ public final class BasicDeviceOperator implements ConfigOperator {
73 */ 75 */
74 public static SparseAnnotations combine(BasicDeviceConfig bdc, SparseAnnotations an) { 76 public static SparseAnnotations combine(BasicDeviceConfig bdc, SparseAnnotations an) {
75 DefaultAnnotations.Builder newBuilder = DefaultAnnotations.builder(); 77 DefaultAnnotations.Builder newBuilder = DefaultAnnotations.builder();
76 - if (bdc.driver() != an.value(AnnotationKeys.DRIVER)) { 78 + if (!Objects.equals(bdc.driver(), an.value(AnnotationKeys.DRIVER))) {
77 newBuilder.set(AnnotationKeys.DRIVER, bdc.driver()); 79 newBuilder.set(AnnotationKeys.DRIVER, bdc.driver());
78 } 80 }
79 if (bdc.name() != null) { 81 if (bdc.name() != null) {
......