Remove unnecessary String() constructor invocations
[yangtools.git] / yang / yang-model-util / src / test / java / org / opendaylight / yangtools / yang / model / util / MustDefinitionImplTest.java
index c4425325cba7a7a3342ee89d1d5d124030e14216..839f1e72ba8e63a602c565bdbae59499e2ea446e 100644 (file)
@@ -16,6 +16,8 @@ import org.junit.Test;
 public class MustDefinitionImplTest {
 
     @Test
+    // We're testing equals()
+    @SuppressWarnings({"ObjectEqualsNull", "EqualsBetweenInconvertibleTypes"})
     public void test() {
         MustDefinitionImpl mdiA;
         MustDefinitionImpl mdiB;
@@ -23,7 +25,7 @@ public class MustDefinitionImplTest {
 
         assertEquals("mdiA should equals to itsefl", mdiA, mdiA);
         assertFalse("mdiA shouldn't equal to null", mdiA.equals(null));
-        assertFalse("mdiA shouldn't equal to object of other type", mdiA.equals(new String("str")));
+        assertFalse("mdiA shouldn't equal to object of other type", mdiA.equals("str"));
 
         // test of equals method