Skip to content

Mapping improvements and add tests#114

Merged
maxhov merged 17 commits intomainfrom
blaze-query-fixes
Mar 10, 2026
Merged

Mapping improvements and add tests#114
maxhov merged 17 commits intomainfrom
blaze-query-fixes

Conversation

@maxhov
Copy link
Copy Markdown
Collaborator

@maxhov maxhov commented Mar 10, 2026

No description provided.

maxhov added 17 commits March 10, 2026 14:28
…on and refactor `DefaultTypeConverter`. Update tests to align with new normalization logic.
…Character values fell through to subsequent type checks

The first three `if` statements were not chained with `else`, causing:
- null values to call setNull() then fall through to the else block calling setObject(position, null)
- Character values to call setString() then fall through to the String/else-if chain
…() to stream close

The configurationProvider.unsetQuery() was called in a finally block that
executed immediately after returning the stream, before it was consumed.
Now unsetQuery() runs in the stream's onClose handler alongside the
ResultSet cleanup.
…ride methods

The wrapContext method was an identity function, making the prepareQueryable
and prepareSql overrides unnecessary pass-throughs to super.
- Test invalid enum name conversion throws IllegalArgumentException
- Test canConvert() always returns true for the default converter
- Test unrecognized types pass through unchanged
- Test double-close of QueryContext throws IllegalStateException
…owing

The Javadoc states it returns null on exception, but the implementation
was throwing RuntimeException — identical to MethodFieldAccessor.
…nds access

The resolveTypeVariable() loop always queried the initial typeVariable
instead of currentTypeVariable, so type variable chains were never
followed. Also added bounds array length check to prevent
ArrayIndexOutOfBoundsException.
Previously, null values from the delegate accessor were passed directly
to the converter method, causing NullPointerException. Now returns null
without invoking the converter.
Adds AccessorTest (8 tests) covering MethodFieldAccessor,
LaxMethodFieldAccessor, FieldFieldAccessor, and ConvertingFieldAccessor
including null handling and error behavior.

Adds DataFormatsTest (10 tests) covering beans convention, component
method convention, fields convention, fields-via-method convention,
nested objects, collections, maps, sub-filter exclusion, and accessor
value correctness.
@maxhov maxhov merged commit eef6e79 into main Mar 10, 2026
2 checks passed
@maxhov maxhov deleted the blaze-query-fixes branch March 13, 2026 14:48
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