Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
Code review suggestions.

Signed-off-by: Ivan Hrasko <[email protected]>
  • Loading branch information
ihrasko committed May 21, 2024
1 parent f505c59 commit 5877d8a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,15 @@ public static Optional<? extends NotificationDefinition> loadNotification(
* @return {@link QName} for input data or empty.
*/
public static Optional<QName> getRpcQName(final XmlElement xmlElement) {
String namespace = xmlElement.namespace();
String nxmlNamespace = xmlElement.namespace();
String name = xmlElement.getName();
if (Strings.isNullOrEmpty(name)) {
return Optional.empty();
}
String revision = null;
if (namespace != null) {
String[] split = namespace.split("\\?");
String namespace;
if (nxmlNamespace != null) {
String[] split = nxmlNamespace.split("\\?");
if (split.length > 1 && split[1].contains("revision=")) {
revision = split[1].replace("revision=", "");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected boolean stopProcedure() {
try {
bgpNettyGroups.close();
} catch (Exception e) {
LOG.warn("Failed to stop BGP dispatcher", e);
LOG.warn("Failed to stop BGP Netty groups", e);
closeSuccess = false;
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ protected boolean initProcedure() {
lightyServices.getBindingDataBroker(), lightyServices.getRpcProviderService(),
lightyServices.getClusterSingletonServiceProvider(), encryptionService);
final NetconfClientFactory netconfFactory = new NetconfClientFactoryImpl(new DefaultNetconfTimer());
final CredentialProvider credentialProvider
= new DefaultCredentialProvider(service);
final SslContextFactoryProvider factoryProvider
= new DefaultSslContextFactoryProvider(service);
final CredentialProvider credentialProvider = new DefaultCredentialProvider(service);
final SslContextFactoryProvider factoryProvider = new DefaultSslContextFactoryProvider(service);
final NetconfClientConfigurationBuilderFactory factory = new NetconfClientConfigurationBuilderFactoryImpl(
encryptionService, credentialProvider, factoryProvider);
final NetconfTopologySchemaAssembler assembler = new NetconfTopologySchemaAssembler(1,1,10, TimeUnit.SECONDS);
Expand Down

0 comments on commit 5877d8a

Please sign in to comment.