Skip to content
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

Android not supported: change java.beans to open source #952

Open
btseytlinTCP opened this issue Mar 28, 2023 · 1 comment
Open

Android not supported: change java.beans to open source #952

btseytlinTCP opened this issue Mar 28, 2023 · 1 comment
Labels

Comments

@btseytlinTCP
Copy link

btseytlinTCP commented Mar 28, 2023

Hello! Trying to integrate into my Android app a library which uses Thymeleaf.

Android is unable import java.beans in the class OGNLShortcutExpression

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;

Android didn't implement java.beans and so open source java beans seems to be the recommendation

So to support Android use cases, changing to an open source variant should allow for me to include that in my android project and for dependencies to resolve: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/openbeans/openbeans-1.0.jar

Thanks

@danielfernandez
Copy link
Member

Uses of classes from the java.beans package are many and deep, not only in OGNLShortcutExpression but also, for instance, in JavaScript serialization code.

Also, Google Code's openbeans has seen 12 years without an update, is only published in Maven Central by an apparently-non-related individual, and is only available elsewhere in a Red Hat maven repo.

Unfortunately also, java.beans.PropertyEditor class is a hard dependency of Spring's form binding status code (e.g. org.springframework.web.servlet.support.BindStatus) which is very used by Thymeleaf. So changes involving a package name could neve be done to the Spring-related packages, only to the core.

I'm therefore leaving this in the future list as a reminder of the possibility to make Thymeleaf Android SDK-compatible (which is not a project's target). Version 4.0 will include a new expression language, but it's not totally clear whether, even with such a change, compatibility would be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants