Skip to content

Commit 74ea339

Browse files
committed
[Java] Revert valueRef validation when presence is constant.
1 parent a699b4c commit 74ea339

File tree

1 file changed

+0
-23
lines changed
  • sbe-tool/src/main/java/uk/co/real_logic/sbe/xml

1 file changed

+0
-23
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/Field.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96,29 +96,6 @@ public void validate(final Node node)
9696

9797
checkForValidName(node, name);
9898

99-
if (presence == Presence.CONSTANT && null != valueRef)
100-
{
101-
final String typeName = type == null ? null : type.name();
102-
103-
if (!(type instanceof EnumType))
104-
{
105-
handleError(node, "valueRef only valid for enum constants, type is " + typeName);
106-
}
107-
108-
final int periodIndex = valueRef.indexOf('.');
109-
if (periodIndex < 1 || periodIndex == (valueRef.length() - 1))
110-
{
111-
handleError(
112-
node, "valueRef format not valid for constant (enum-name.valid-value-name): " + valueRef);
113-
}
114-
115-
final String valueRefType = valueRef.substring(0, periodIndex);
116-
if (!valueRefType.equals(typeName))
117-
{
118-
handleError(node, "valueRef type " + valueRefType + " does not match " + typeName);
119-
}
120-
}
121-
12299
if (type instanceof EnumType && presence == Presence.CONSTANT)
123100
{
124101
if (null == valueRef)

0 commit comments

Comments
 (0)