Details
-
Bug
-
Status: Resolved
-
Medium
-
Resolution: Done
-
None
-
None
Description
Given:
typedef ipv4-address {
type string {
pattern
'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
+ '(%[\p{N}\p{L}]+)?';
}
}
typedef ipv4-address-no-zone {
type inet:ipv4-address {
pattern '[0-9\.]*';
}
}
we end up with:
@ConstructorProperties("value") public Ipv4AddressNoZone(String _value) { super(_value); Objects.requireNonNull(_value, "Supplied value may not be null"); CodeHelpers.checkPattern(_value, patterns, regexes); } /** * Creates a copy from Source Object. * * @param source Source object */ public Ipv4AddressNoZone(Ipv4AddressNoZone source) { super(source); } /** * Creates a new instance from Ipv4Address * * @param source Source object */ public Ipv4AddressNoZone(Ipv4Address source) { super(source); }
note how the final constructor fails to perform additional checks required to comply with the argument. This needs to be rectified.