Skip to content
Snippets Groups Projects
Commit b27cd432 authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

check with regex before finding instance number

parent 452896c1
Branches
No related tags found
1 merge request!32Resolve "A DO name may contain digits inside"
......@@ -631,11 +631,12 @@ public class DataObjectPresenceConditionValidator {
String[] names = new String[] { do_.getName() };
if( ! presentDO.containsKey( names[0] )) {
// if( do_.getName().matches( "[a-zA-Z]+\\d+" )) {
names = do_.getName().split( "(?=\\d)", 2 );
if( names.length == 0 ) {
console.error( "[NSD validation] Unexpected DO name " + do_.getName() + " in LNodeType (line " + do_.getParentLNodeType().getLineNumber() );
return false;
if( do_.getName().matches( "[a-zA-Z]+\\d+" )) {
names = do_.getName().split( "(?=\\d)", 2 );
if( names.length != 2 ) {
console.error( "[NSD validation] Unexpected DO name " + do_.getName() + " in LNodeType (line " + do_.getParentLNodeType().getLineNumber() );
return false;
}
}
}
if( ! presentDO.containsKey( names[0] )) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment