[ 
https://issues.apache.org/jira/browse/PLC4X-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17118465#comment-17118465
 ] 

Alessandro Rossignoli edited comment on PLC4X-200 at 5/28/20, 8:53 AM:
-----------------------------------------------------------------------

Looks like the regex expression is able to get the params String = "" if there 
is a trailing "/" on the address.

So basically:
 * this *is working* opcua:tcp://localhost:4840/
 * this *{color:#ff0000}is not working{color}* 
{color:#172b4d}opcua:tcp://localhost:4840{color}

{color:#172b4d}I think that these trivial cases should be addressed by the 
library (it was in 0.5.0). To do so we could apply one of these:{color}
 * {color:#172b4d}appending the trailing "/" if missing{color}
 * {color:#172b4d}check and ignore the null value for the params{color}


was (Author: itaross):
Looks like the regex expression is able to get the params String = "" if there 
is a trailing "/" on the address.

So basically:
 * this *is working* opcua:tcp://localhost:4840/
 * this *{color:#FF0000}is not working{color}* 
{color:#172b4d}opcua:tcp://localhost:4840{color}

{color:#172b4d}I think that for trivial cases we could apply a simple fix that 
could be:{color}
 * {color:#172b4d}appending the trailing "/" if missing{color}
 * {color:#172b4d}check and ignore the null value for the params{color}

> OPC-UA Driver not connecting if params string is not provided
> -------------------------------------------------------------
>
>                 Key: PLC4X-200
>                 URL: https://issues.apache.org/jira/browse/PLC4X-200
>             Project: Apache PLC4X
>          Issue Type: Bug
>          Components: Driver-OPC-UA
>    Affects Versions: 0.7.0
>            Reporter: Alessandro Rossignoli
>            Priority: Major
>              Labels: newbie
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When creating a new connection to the driver without params, using the TCP 
> transport method, the driver will throw a null pointer exception.
> method: private static String getOptionString(String params)
> file: _OpcuaTcpPlcConnection.java_ line 558
> I am not really an expert of the OPC UA specificatin, but I think that a null 
> check for this could solve the problem easily.
> This issue was not present on version 0.5.0, now upgrading to 0.7.0 the 
> connection cannot be established and I am pretty sure that the 
> getOptionString method that was introduced is the cause of this.
>  
> I am available for a PR



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to