final Dictionary<String, String> props = new Hashtable<>();
props.put(NetconfConstants.SERVICE_NAME, NetconfConstants.NETCONF_NOTIFICATION);
netconfNotificationCollectorServiceRegistration = context.registerService(NetconfNotificationCollector.class,
- netconfNotificationManager, new Hashtable<String, Object>());
+ netconfNotificationManager, new Hashtable<>());
final NetconfOperationServiceFactory netconfOperationServiceFactory = new NetconfOperationServiceFactory() {
final List<List<NetconfMessage>> allPreparedMessages = new ArrayList<>(threadAmount);
for (int i = 0; i < threadAmount; i++) {
if (i != threadAmount - 1) {
- allPreparedMessages.add(new ArrayList<NetconfMessage>(requestsPerThread));
+ allPreparedMessages.add(new ArrayList<>(requestsPerThread));
} else {
- allPreparedMessages.add(new ArrayList<NetconfMessage>(requestsPerThread + leftoverRequests));
+ allPreparedMessages.add(new ArrayList<>(requestsPerThread + leftoverRequests));
}
}
if (context.getWriterParameters().isPrettyPrint()) {
xmlWriter = new IndentingXMLStreamWriter(xmlWriter);
}
- } catch (final XMLStreamException e) {
- throw new IllegalStateException(e);
- } catch (final FactoryConfigurationError e) {
+ } catch (final XMLStreamException | FactoryConfigurationError e) {
throw new IllegalStateException(e);
}
final NormalizedNode<?, ?> data = context.getData();
final XMLStreamWriter xmlWriter =
XML_FACTORY.createXMLStreamWriter(entityStream, StandardCharsets.UTF_8.name());
writeDocument(xmlWriter, patchStatusContext);
- } catch (final XMLStreamException e) {
- throw new IllegalStateException(e);
- } catch (final FactoryConfigurationError e) {
+ } catch (final XMLStreamException | FactoryConfigurationError e) {
throw new IllegalStateException(e);
}
}
final XMLStreamWriter xmlWriter;
try {
xmlWriter = XML_FACTORY.createXMLStreamWriter(outStream, StandardCharsets.UTF_8.name());
- } catch (final XMLStreamException e) {
- throw new IllegalStateException(e);
- } catch (final FactoryConfigurationError e) {
+ } catch (final XMLStreamException | FactoryConfigurationError e) {
throw new IllegalStateException(e);
}
NormalizedNode<?, ?> data = errorsNode.getData();
final XMLStreamWriter xmlWriter =
XML_FACTORY.createXMLStreamWriter(entityStream, StandardCharsets.UTF_8.name());
writeDocument(xmlWriter, patchStatusContext);
- } catch (final XMLStreamException e) {
- throw new IllegalStateException(e);
- } catch (final FactoryConfigurationError e) {
+ } catch (final XMLStreamException | FactoryConfigurationError e) {
throw new IllegalStateException(e);
}
}