You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by "Gerardo Melia (Jira)" <ji...@apache.org> on 2020/08/02 15:13:00 UTC
[jira] [Created] (PLC4X-222) Wrong s7URIPattern
Gerardo Melia created PLC4X-222:
-----------------------------------
Summary: Wrong s7URIPattern
Key: PLC4X-222
URL: https://issues.apache.org/jira/browse/PLC4X-222
Project: Apache PLC4X
Issue Type: Bug
Components: API
Affects Versions: 0.7.0
Reporter: Gerardo Melia
Using S7 driver in 0.7.0 I got this error:
{code:java}
Caused by: java.lang.IllegalArgumentException: s7://192.168.1.200/0/1 doesn't match{code}
when the connection string seems to be Ok.
I see that in the current version you [fix it|[https://github.com/apache/plc4x/blob/1e6df7563ad909d365d1402729699b61c70019bd/plc4j/tools/connection-pool/src/main/java/org/apache/plc4x/java/utils/connectionpool/PoolKeyFactory.java#L46]] because It includes rack and slot but in 0.7.0 is wrong:
{code:java}
private final Pattern s7URIPattern = Pattern.compile("^(?<poolablePart>s7://((?<ip>[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})|(?<hostname>[a-zA-Z0-9\\.\\-]+))(:(?<port>[0-9]{1,5}))?)(?<params>\\?.*)?");{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)