-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
None
The following snippet:
typedef timeticks { type uint32; }
results in:
private final Uint32 _value; private static void check_valueRange(final long value) { } @ConstructorParameters("value") public Timeticks(Uint32 _value) { if (_value != null) { check_valueRange(_value.longValue()); } CodeHelpers.requireValue(_value); this._value = _value; }
This also happens when the effective range covers the entire type.
The problem seems to be that BindingGeneratorUtil (i.e. mdsal-binding-generator) does not filter implied ranges, but rather we filter them in RangeGenerator (i.e. mdsal-binding-java-api-generator) – at which point we do not have an easy way to suppress these.
It would seem we should be able to filter the expressions before we emit Restrictions, and thus make it easy to skip the checks.