You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seems to be the only mutable field in CsvSchema and it could be made final as well.
If CsvSchema is immutable and/or thread-safe, it would be helpful for the documentation to state as much. You could also convert _features to a final field which would make this more clear on an implementation-level. Instead of setting _features multiple times, you could move this logic into the constructors and only assign it once.
The text was updated successfully, but these errors were encountered:
Yes, so actually CsvSchema is immutable for all practical purposes... unless someone decided to sub-class it. Not sure why _features was declared that way.
I will change it to be final and add some verbiage in Javadoc.
cowtowncoder
changed the title
Is CsvSchema thread-safe?
Enforce, document thread-safety of CsvSchemaMar 31, 2025
Uh oh!
There was an error while loading. Please reload this page.
Unless I'm mistaken,
jackson-dataformats-text/csv/src/main/java/com/fasterxml/jackson/dataformat/csv/CsvSchema.java
Line 890 in de19091
final
as well.If CsvSchema is immutable and/or thread-safe, it would be helpful for the documentation to state as much. You could also convert
_features
to afinal
field which would make this more clear on an implementation-level. Instead of setting_features
multiple times, you could move this logic into the constructors and only assign it once.The text was updated successfully, but these errors were encountered: