Skip to content

Conversation

@SijieMei
Copy link

@SijieMei SijieMei commented Oct 8, 2024

Issue:

When I run the test com.univocity.parsers.common.processor.MultiBeanListProcessorTest.testAnnotatedBeanProcessor, I met the error:
2aa66d0d92cdae3b8bd0b5b8c4fe01f

Reason:

Class TestBean has two attributes "pending" and "other". The attribute used both trim and booleanString. Since getDeclaredAnnotations doesn't ensure order, it may happen BooleanString is executed first and then trim is executed. This will cause errors that call trim on Boolean type.

Changes:

In the AnnotationHelp, add logic to sort BooleanString at the end of "found" array.

In the test com.univocity.parsers.common.processor.MultiBeanListProcessorTest.testAnnotatedBeanProcessor,  pending used both trim and booleanString. Since getDeclaredAnnotations doesn't ensure order, it may happen booleanString is executed first and then trim. This will cause error that calling trim on boolean type.

fix: typo
@UltraCharge99
Copy link

Please see #534

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.

2 participants