You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by GitBox <gi...@apache.org> on 2020/12/19 19:50:17 UTC

[GitHub] [plc4x] hutcheb commented on a change in pull request #214: Add enum's for opc ua driver in mspec

hutcheb commented on a change in pull request #214:
URL: https://github.com/apache/plc4x/pull/214#discussion_r546275899



##########
File path: plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/protocol/OpcuaField.java
##########
@@ -68,12 +69,14 @@ public static OpcuaField of(String address) {
         String identifier = matcher.group("identifier");
 
         String identifierTypeString = matcher.group("identifierType");
-        OpcuaIdentifierType identifierType = OpcuaIdentifierType.fromString(identifierTypeString);
+        OpcuaIdentifierType identifierType = OpcuaIdentifierType.enumForValue(identifierTypeString);

Review comment:
       A null pointer exception is eventually raised, might be worth adding a contains key to the enum template as it looks like it is a concern with all of the Field classes.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org