Open CoenNeefjesTrackbee opened 4 months ago
19.0.2
When executing a postal code validation on a String containing only "-" an ArrayIndexOutOfBoundsException is thrown.
ArrayIndexOutOfBoundsException
Call ServerSideApiUtil.normalize("-", "zp") from anywhere in your codebase.
ServerSideApiUtil.normalize("-", "zp")
An ArrayIndexOutOfBoundsException is thrown: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
I would expect an IllegalArgumentException to be thrown instead.
IllegalArgumentException
Which SDK version are you using?
19.0.2
What's the issue?
When executing a postal code validation on a String containing only "-" an
ArrayIndexOutOfBoundsException
is thrown.Steps/Sample code to reproduce the issue
Call
ServerSideApiUtil.normalize("-", "zp")
from anywhere in your codebase.Observed Results:
An
ArrayIndexOutOfBoundsException
is thrown:java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
Expected Results:
I would expect an
IllegalArgumentException
to be thrown instead.