Skip to content

Fix: validate url parameter is a string in connect() (issue #95)#96

Open
HenryNebula wants to merge 1 commit intodevfrom
triage/95-getconnection-overload
Open

Fix: validate url parameter is a string in connect() (issue #95)#96
HenryNebula wants to merge 1 commit intodevfrom
triage/95-getconnection-overload

Conversation

@HenryNebula
Copy link
Copy Markdown
Owner

Summary

Fixes #95: Users passing a list/dict as the url parameter (common mistake when mixing up url and driver_args) got an opaque JPype TypeError: No matching overloads found for getConnection. Now raises a clear ProgrammingError with usage guidance.

Changes

  • Add isinstance(url, str) validation at the top of connect() in jaydebeapiarrow/__init__.py
  • Error message explains the correct argument order: connect(jclassname, url, driver_args=None, jars=None, libs=None)

Test plan

  • Added ConnectValidationTest in test/test_mock.py (list and dict cases)
  • Added integration test in test/test_integration.py
  • All 111 mock tests pass
  • All 41 HSQLDB integration tests pass

Closes #95

Generated with Claude Code

When users pass a list as the url parameter (e.g., mixing up url and
driver_args), JPype throws an opaque "No matching overloads found for
getConnection" TypeError. Add a Python-level validation with a clear
error message that explains the correct argument order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant