Eliminate xmlunit-legacy from yang-data-impl 67/108067/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Sep 2023 17:20:09 +0000 (19:20 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Sep 2023 18:05:57 +0000 (20:05 +0200)
We have only a single unused class here, remove it and ditch dependency
on xmlunit.

Change-Id: I722c804b6a7c7dfcf15e077f718ba4b47b128086
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
data/yang-data-impl/pom.xml
data/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/IgnoreWhiteCharsDiffListener.java [deleted file]

index 48c7414cbf173bccec11e1dcbb6f5bb22b95d461..431f5078e8ffded1ab4e365755ea83ce24a6df30 100644 (file)
             <artifactId>yang-model-util</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.xmlunit</groupId>
-            <artifactId>xmlunit-legacy</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-parser-spi</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
-
 </project>
diff --git a/data/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/IgnoreWhiteCharsDiffListener.java b/data/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/IgnoreWhiteCharsDiffListener.java
deleted file mode 100644 (file)
index 3dfe836..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013 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.yangtools.yang.data.impl;
-
-import org.custommonkey.xmlunit.Difference;
-import org.custommonkey.xmlunit.DifferenceConstants;
-import org.custommonkey.xmlunit.DifferenceListener;
-
-/**
- * Implementatin of {@link DifferenceListener} ignoring white characters around text elements.
- *
- * @author mirehak
- */
-public class IgnoreWhiteCharsDiffListener implements DifferenceListener {
-
-    @Override
-    public void skippedComparison(org.w3c.dom.Node control,
-            org.w3c.dom.Node test) {
-        // do nothing
-    }
-
-    @Override
-    public int differenceFound(Difference diff) {
-
-        if (diff.getId() == DifferenceConstants.TEXT_VALUE.getId()) {
-            String control = diff.getControlNodeDetail().getValue();
-            if (control != null) {
-                control = control.trim();
-                if (diff.getTestNodeDetail().getValue() != null
-                    && control.equals(diff.getTestNodeDetail().getValue().trim())) {
-                    return
-                        DifferenceListener.RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR;
-                }
-            }
-        }
-        return RETURN_ACCEPT_DIFFERENCE;
-    }
-}