Skip to content

Commit

Permalink
fix(opcua): fix address pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Aug 7, 2023
1 parent 503af35 commit 8464f58
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plc4go/internal/opcua/TagHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type TagHandler struct {

func NewTagHandler() TagHandler {
return TagHandler{
tagAddress: regexp.MustCompile(`^ns=(?P<namespace>\d+);(?P<identifierType>[isgb])=(?P<identifier>[^;]+)?(;(?P<datatype>[a-zA-Z_]+))?`),
tagAddress: regexp.MustCompile(`^ns=(?P<namespace>\d+);(?P<identifierType>[isgb])=(?P<identifier>[^;]+)?(;(?P<datatype>[a-zA-Z_]+))?$`),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

public class OpcuaTag implements PlcSubscriptionTag {

public static final Pattern ADDRESS_PATTERN = Pattern.compile("^ns=(?<namespace>\\d+);(?<identifierType>[isgb])=(?<identifier>[^;]+)?(;(?<datatype>[a-zA-Z_]+))?");
public static final Pattern ADDRESS_PATTERN = Pattern.compile("^ns=(?<namespace>\\d+);(?<identifierType>[isgb])=(?<identifier>[^;]+)?(;(?<datatype>[a-zA-Z_]+))?$");

private final OpcuaIdentifierType identifierType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@ public class OpcuaSubscriptionHandleTest {

private static PlcConnection opcuaConnection;

@BeforeEach
public void before() {
}

@AfterEach
public void after() {

}

// ! If this test fails, see comment at the top of the class before investigating.
@BeforeAll
public static void setup() throws Exception {
Expand Down

0 comments on commit 8464f58

Please sign in to comment.