New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ThymeleafTemplateEngineImpl.WebIContext Locale bug introduced in 3.1 #226
Comments
Fixes #226: use default empty string for locale country and variant
Cool. Do you release maintenance versions? |
We're also hit but this bug. Any plans, when to release 3.1.1 with this fix included? Thanks. |
we plan a 3.2 release within a couple of weeks. |
Cool. However if you have apps in production it's not OK to upgrade just like that. A maintenance version that does not include new feauters, just bug fixes is a nice thing to have. You can upgrade without too many issues. |
@goerge I've fixed it by copy pasting the class and using my own version until the release is there: https://gist.github.com/ieugen/56a1da25281702f732e6 |
that seems not fixed for all cases, I've got NPE in 3.4.0 for ParsableLanguageValue.parsedValues = '[ru]' . |
Fix #226: do not assume country is always provided
Hi there,
After upgrading to version 3.1 I started getting NullPointerException and narrow it down to the code that creates a new Locale object. I'm using Thymeleaf template engine.
private WebIContext(VariablesMap<String, Object> data, io.vertx.ext.web.Locale locale) {
this.data = data;
this.locale = new Locale(locale.language(), locale.country(), locale.variant());
}
Standard Java Locale will throw NPE if country or variants are null, but will happily take an empty string. Maybe vert.x's own Locale should convert and use empty string rather than nulls for country and variant.
Thanks
Dragan
The text was updated successfully, but these errors were encountered: