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

Cannot use java.util.Currency in expressions #991

Open
Homyakin opened this issue Jan 26, 2024 · 0 comments
Open

Cannot use java.util.Currency in expressions #991

Homyakin opened this issue Jan 26, 2024 · 0 comments

Comments

@Homyakin
Copy link

  • Version of Thymeleaf (and any involved extensions) you are using.
    3.1.1.RELEASE
  • Environment: versions of Spring, Spring Boot, or any other relevant libraries.
    Spring Boot 3.1.1
  • Detailed steps to reproduce your issue.
    Using expressions:
    ${amount.getCurrency().getCurrencyCode()}
    ${amount.getCurrency().getDisplayName(T(java.util.Locale).ENGLISH)}

Calling method 'getDisplayName' is forbidden for type 'class java.util.Currency' in Thymeleaf expressions. Blocked classes are: [com.sun., jakarta., java., javax., jdk., org.ietf.jgss., org.omg., org.w3c.dom., org.xml.sax., sun.]. Allowed classes are: [java.lang.Boolean, java.lang.Byte, java.lang.Character, java.lang.Double, java.lang.Enum, java.lang.Float, java.lang.Integer, java.lang.Iterable, java.lang.Long, java.lang.Math, java.lang.Number, java.lang.Short, java.lang.String, java.math.BigDecimal, java.math.BigInteger, java.math.RoundingMode, java.time.*, java.util.ArrayList, java.util.Calendar, java.util.Calendar, java.util.Collection, java.util.Date, java.util.Enumeration, java.util.HashMap, java.util.HashSet, java.util.Iterator, java.util.LinkedHashMap, java.util.LinkedHashSet, java.util.LinkedList, java.util.List, java.util.Locale, java.util.Map, java.util.Map$Entry, java.util.Optional, java.util.Properties, java.util.Set, java.util.stream.Stream].

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

No branches or pull requests

1 participant