BitonicSort currently dereferences a null input while checking its length, producing an incidental NullPointerException. The proposed change validates the input first, raises a descriptive IllegalArgumentException, and adds a focused regression test. This issue accompanies a Matcha study recommendation derived from https://stackoverflow.com/a/64124615.
BitonicSort currently dereferences a null input while checking its length, producing an incidental NullPointerException. The proposed change validates the input first, raises a descriptive IllegalArgumentException, and adds a focused regression test. This issue accompanies a Matcha study recommendation derived from https://stackoverflow.com/a/64124615.