Subject: [pgjdbc/pgjdbc] PR #3633: fix: add validation for rectangular arrays in ArrayEncoding Closes #3567

From: "awadhesh14 (@awadhesh14)" <[email-masked]>
Date: Sat, 17 May 2025 08:44:03 +0000

Add validation to reject jagged arrays during array creation.
Previously, jagged arrays caused silent corruption in text mode
or protocol errors in binary mode.

Validation includes:
- Recursive dimension checks for multi-dimensional arrays
- Null element preservation (PostgreSQL-compatible)
- Detailed error messages with array indices
- Full compatibility with valid rectangular arrays

Closes #3567

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document?
* [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

### Changes to Existing Features:

* [ ] Does this break existing behaviour? If so please explain.
* [x] Have you added an explanation of what your changes do and why you'd like us to include them?
* [x] Have you written new tests for your core changes, as applicable?
* [x] Have you successfully run tests with your changes locally?

---

From: "awadhesh14 (@awadhesh14)" <[email-masked]>
Date: Tue, 20 May 2025 16:57:45 +0000

@davecramer

1. fixed the code style according to the style guide.
2. fixed the jagged array in existing test case.

All checks are passing. Please review when convenient.