Use java.nio to manage files 34/115334/1
authorGilles Thouenon <gilles.thouenon@orange.com>
Sat, 8 Feb 2025 16:56:08 +0000 (17:56 +0100)
committerGilles Thouenon <gilles.thouenon@orange.com>
Tue, 11 Feb 2025 16:19:29 +0000 (17:19 +0100)
commit409eecdaab5ffd0d095508ba3d4d34df5313231f
tree446da4280b6b253dee518042c8cf22418dbb1542
parent5f3559cfb576e498aad446f22c445ecb7d30f5d3
Use java.nio to manage files

It remains several places (mainly in test-common module) where files are
handled with the java.io package.
Instead, use the more modern objects from java.nio.file.
Also, use Files.newBufferedReader() instead of FileReader.

JIRA: TRNSPRTPCE-854
Change-Id: I9abb07071e4e7e4150d03c07146fbebf09691451
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
26 files changed:
common/src/test/java/org/opendaylight/transportpce/common/catalog/CatalogUtilsTest.java
common/src/test/java/org/opendaylight/transportpce/common/converter/JsonStringConverterTest.java
common/src/test/java/org/opendaylight/transportpce/common/mapping/MappingUtilsImplTest.java
lighty/src/test/java/io/lighty/controllers/tpce/MaintTest.java
nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/producer/PublisherTest.java
nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationAlarmServiceDeserializerTest.java
nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationAlarmServiceSerializerTest.java
nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationServiceDeserializerTest.java
nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationServiceSerializerTest.java
nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationTapiServiceDeserializerTest.java
nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/serialization/NotificationTapiServiceSerializerTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesServiceTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmOtnTopologyTest.java
pce/src/test/java/org/opendaylight/transportpce/pce/PceSendingPceRPCsTest.java
pce/src/test/java/org/opendaylight/transportpce/pce/constraints/OperatorConstraintsTest.java
pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java
pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/consumer/GnpyConsumerTest.java
pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/consumer/GnpyStub.java
pce/src/test/java/org/opendaylight/transportpce/pce/graph/PceGraphTest.java
pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestUtils.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/DataConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/JsonDataConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/XmlDataConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/utils/TopologyDataUtils.java
test-common/src/test/java/org/opendaylight/transportpce/test/converter/JsonDataConverterTest.java
test-common/src/test/java/org/opendaylight/transportpce/test/converter/XmlDataConverterTest.java