Skip to content

Commit e466f27

Browse files
authored
Remove Xalan from the dependencies (#67)
* Update dependencies to the most recent version * Remove xalan from the set of dependencies * Bump version to next release
1 parent 4e07fdf commit e466f27

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

pom.xml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>net.juniper.netconf</groupId>
99
<artifactId>netconf-java</artifactId>
10-
<version>2.1.1.6.3</version>
10+
<version>2.1.1.7</version>
1111
<packaging>jar</packaging>
1212

1313
<properties>
@@ -257,17 +257,12 @@
257257
<groupId>org.projectlombok</groupId>
258258
<artifactId>lombok</artifactId>
259259
<scope>provided</scope>
260-
<version>1.18.22</version>
260+
<version>1.18.24</version>
261261
</dependency>
262262
<dependency>
263263
<groupId>org.slf4j</groupId>
264264
<artifactId>slf4j-api</artifactId>
265-
<version>1.7.32</version>
266-
</dependency>
267-
<dependency>
268-
<groupId>xalan</groupId>
269-
<artifactId>xalan</artifactId>
270-
<version>2.7.2</version>
265+
<version>2.0.3</version>
271266
</dependency>
272267
<dependency>
273268
<groupId>org.hamcrest</groupId>
@@ -279,7 +274,7 @@
279274
<groupId>junit</groupId>
280275
<artifactId>junit</artifactId>
281276
<scope>test</scope>
282-
<version>4.13.1</version>
277+
<version>4.13.2</version>
283278
<exclusions>
284279
<exclusion>
285280
<groupId>org.hamcrest</groupId>
@@ -290,34 +285,41 @@
290285
<dependency>
291286
<groupId>org.assertj</groupId>
292287
<artifactId>assertj-core</artifactId>
293-
<version>3.9.0</version>
288+
<version>3.23.1</version>
294289
<scope>test</scope>
295290
</dependency>
296291

297292
<dependency>
298293
<groupId>org.mockito</groupId>
299294
<artifactId>mockito-core</artifactId>
300-
<version>3.11.2</version>
295+
<version>4.8.1</version>
301296
<scope>test</scope>
302297
</dependency>
303298

304299
<dependency>
305300
<groupId>commons-io</groupId>
306301
<artifactId>commons-io</artifactId>
307302
<scope>test</scope>
308-
<version>2.7</version>
303+
<version>2.11.0</version>
309304
</dependency>
310305

311306
<dependency>
312307
<groupId>com.google.guava</groupId>
313308
<artifactId>guava</artifactId>
314-
<version>30.0-jre</version>
309+
<version>31.1-jre</version>
315310
</dependency>
316311

317312
<dependency>
318313
<groupId>org.xmlunit</groupId>
319314
<artifactId>xmlunit-assertj</artifactId>
320-
<version>2.8.2</version>
315+
<version>2.9.0</version>
316+
<scope>test</scope>
317+
</dependency>
318+
319+
<dependency>
320+
<groupId>org.slf4j</groupId>
321+
<artifactId>slf4j-simple</artifactId>
322+
<version>2.0.3</version>
321323
<scope>test</scope>
322324
</dependency>
323325

src/main/java/net/juniper/netconf/XML.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
package net.juniper.netconf;
1010

1111
import com.google.common.base.Preconditions;
12-
import org.apache.xml.serializer.OutputPropertiesFactory;
1312
import org.w3c.dom.Document;
1413
import org.w3c.dom.Element;
1514
import org.w3c.dom.Node;
@@ -507,7 +506,7 @@ public String toString() {
507506
TransformerFactory transFactory = TransformerFactory.newInstance();
508507
Transformer transformer = transFactory.newTransformer();
509508
StringWriter buffer = new StringWriter();
510-
transformer.setOutputProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR, "\n");
509+
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC,"yes");
511510
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
512511
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
513512
transformer.setOutputProperty

src/test/java/net/juniper/netconf/DeviceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import static org.assertj.core.api.Assertions.assertThatThrownBy;
2121
import static org.junit.Assert.assertFalse;
2222
import static org.junit.Assert.assertNull;
23-
import static org.mockito.Matchers.anyString;
24-
import static org.mockito.Matchers.eq;
23+
import static org.mockito.ArgumentMatchers.anyString;
24+
import static org.mockito.ArgumentMatchers.eq;
2525
import static org.mockito.Mockito.doThrow;
2626
import static org.mockito.Mockito.mock;
2727
import static org.mockito.Mockito.times;

src/test/java/net/juniper/netconf/NetconfSessionTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.junit.experimental.categories.Category;
1111
import org.mockito.Mock;
1212
import org.mockito.MockitoAnnotations;
13+
import org.xmlunit.assertj.XmlAssert;
1314

1415
import javax.xml.parsers.DocumentBuilder;
1516
import javax.xml.parsers.DocumentBuilderFactory;
@@ -26,7 +27,6 @@
2627

2728
import static org.assertj.core.api.Assertions.assertThat;
2829
import static org.assertj.core.api.Assertions.assertThatThrownBy;
29-
import static org.junit.Assert.assertEquals;
3030
import static org.junit.Assert.assertThrows;
3131
import static org.mockito.ArgumentMatchers.any;
3232
import static org.mockito.ArgumentMatchers.anyInt;
@@ -190,7 +190,10 @@ public void GIVEN_executeRPC_WHEN_lldpRequest_THEN_correctResponse() throws Exce
190190
Thread.sleep(200);
191191
String deviceResponse = netconfSession.executeRPC(TestConstants.LLDP_REQUEST).toString();
192192

193-
assertEquals(expectedResponse, deviceResponse);
193+
XmlAssert.assertThat(deviceResponse)
194+
.and(expectedResponse)
195+
.ignoreWhitespace()
196+
.areIdentical();
194197
}
195198

196199
@Test

0 commit comments

Comments
 (0)