@@ -175,7 +175,7 @@ public void stop(final @NotNull ProtocolAdapterStopInput input, final @NotNull P
175175 OpcUaSubscriptionLifecycle temp = opcUaSubscriptionLifecycle ;
176176 opcUaSubscriptionLifecycle = null ;
177177 if (temp != null ) {
178- opcUaSubscriptionLifecycle .stop ();
178+ temp .stop ();
179179 }
180180 try {
181181 return opcUaClient
@@ -194,7 +194,8 @@ public void stop(final @NotNull ProtocolAdapterStopInput input, final @NotNull P
194194 public void discoverValues (
195195 final @ NotNull ProtocolAdapterDiscoveryInput input ,
196196 final @ NotNull ProtocolAdapterDiscoveryOutput output ) {
197- Objects .requireNonNull (opcUaClient , "OPC UA Adapter not started yet" );
197+ OpcUaClient client = opcUaClient ;
198+ Objects .requireNonNull (client , "OPC UA Adapter not started yet" );
198199
199200 final NodeId browseRoot ;
200201 if (input .getRootNode () == null || input .getRootNode ().isBlank ()) {
@@ -207,7 +208,7 @@ public void discoverValues(
207208 browseRoot = parsedNodeId .get ();
208209 }
209210
210- browse (opcUaClient , browseRoot , null , (ref , parent ) -> {
211+ browse (client , browseRoot , null , (ref , parent ) -> {
211212 final String name = ref .getBrowseName () != null ? ref .getBrowseName ().getName () : "" ;
212213 final String displayName = ref .getDisplayName () != null ? ref .getDisplayName ().getText () : "" ;
213214 final NodeType nodeType = getNodeType (ref );
0 commit comments