Skip to content

Commit

Permalink
Remove Xalan from the dependencies (#67)
Browse files Browse the repository at this point in the history
* Update dependencies to the most recent version

* Remove xalan from the set of dependencies

* Bump version to next release
  • Loading branch information
GregDThomas committed Oct 27, 2022
1 parent 4e07fdf commit e466f27
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
30 changes: 16 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>net.juniper.netconf</groupId>
<artifactId>netconf-java</artifactId>
<version>2.1.1.6.3</version>
<version>2.1.1.7</version>
<packaging>jar</packaging>

<properties>
Expand Down Expand Up @@ -257,17 +257,12 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
<version>1.18.22</version>
<version>1.18.24</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.32</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.2</version>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
Expand All @@ -279,7 +274,7 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.13.1</version>
<version>4.13.2</version>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
Expand All @@ -290,34 +285,41 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.9.0</version>
<version>3.23.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.11.2</version>
<version>4.8.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
<version>2.7</version>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.0-jre</version>
<version>31.1-jre</version>
</dependency>

<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-assertj</artifactId>
<version>2.8.2</version>
<version>2.9.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.3</version>
<scope>test</scope>
</dependency>

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/juniper/netconf/XML.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package net.juniper.netconf;

import com.google.common.base.Preconditions;
import org.apache.xml.serializer.OutputPropertiesFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Expand Down Expand Up @@ -507,7 +506,7 @@ public String toString() {
TransformerFactory transFactory = TransformerFactory.newInstance();
Transformer transformer = transFactory.newTransformer();
StringWriter buffer = new StringWriter();
transformer.setOutputProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR, "\n");
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC,"yes");
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/net/juniper/netconf/DeviceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
Expand Down
7 changes: 5 additions & 2 deletions src/test/java/net/juniper/netconf/NetconfSessionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.junit.experimental.categories.Category;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.xmlunit.assertj.XmlAssert;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
Expand All @@ -26,7 +27,6 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
Expand Down Expand Up @@ -190,7 +190,10 @@ public void GIVEN_executeRPC_WHEN_lldpRequest_THEN_correctResponse() throws Exce
Thread.sleep(200);
String deviceResponse = netconfSession.executeRPC(TestConstants.LLDP_REQUEST).toString();

assertEquals(expectedResponse, deviceResponse);
XmlAssert.assertThat(deviceResponse)
.and(expectedResponse)
.ignoreWhitespace()
.areIdentical();
}

@Test
Expand Down

0 comments on commit e466f27

Please sign in to comment.