X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2Fstructures%2FYangElement.java;h=005e5fedafae338bb7304170802ab2d6ea7868c4;hb=8a8f76419087916c3f573eb17a321f78c127c806;hp=d10eb342c28e9be2998bb292fd024a592a6fce92;hpb=befccf53b65b379b476290f55590f54c7f250ebb;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/YangElement.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/YangElement.java index d10eb342c2..005e5fedaf 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/YangElement.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/YangElement.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.restconf.impl.test.structures; public class YangElement { @@ -6,7 +13,7 @@ public class YangElement { protected YangElement(String name) { this.name = name; } - + public String getName() { return name; } @@ -20,7 +27,11 @@ public class YangElement { return false; } YangElement yangElement = (YangElement) obj; - if (!this.name.equals(yangElement.name)) { + if (this.name == null) { + if (yangElement.name != null) { + return false; + } + } else if (!this.name.equals(yangElement.name)) { return false; } return true;