Skip to content

Remove integer conversion in JmsListenerContainerParser [SPR-10986] #15614

@spring-projects-issues

Description

@spring-projects-issues

Joakim Recht opened SPR-10986 and commented

#14187 fixed the jms schema to allow non-integer values in xml. However, the namespace parser still converts the input to Integer for pre-fetch and receive-timeout. This means that you cannot use EL or property placeholders to configure the value:

Caused by: java.lang.NumberFormatException: For input string: "#{1*1000}"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:481)
	at java.lang.Integer.<init>(Integer.java:677)
	at org.springframework.jms.config.JmsListenerContainerParser.parseContainer(JmsListenerContainerParser.java:157)
	at org.springframework.jms.config.AbstractListenerContainerParser.parseListener(AbstractListenerContainerParser.java:146)

Affects: 3.2.4

Referenced from: commits ccafccb, d48b9b1

Backported to: 3.2.6

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions