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

BufferedImageHttpMessageConverter fails if JAI is installed [SPR-11581] #16205

Closed
spring-projects-issues opened this issue Mar 19, 2014 · 1 comment
Assignees
Labels
in: web status: backported type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Mar 19, 2014

Bryan Turner opened SPR-11581 and commented

When Oracle JAI is installed, ImageIO.getReaderMIMETypes() and ImageIO.getWriterMIMETypes() both return a leading empty string in their arrays. This causes BufferedImageHttpMessageConverter's constructor to fail.

I doubt this is actually a Spring bug; it seems far more likely this is a JAI bug (That said, the documentation for the ImageIO methods doesn't really establish any expectations for the returned array, which is unfortunate). However, working around it in Spring may be beneficial.


Affects: 3.2.8, 4.0.2

Reference URL: http://stackoverflow.com/questions/12667311/imageio-getreadermimetypes-returning-null-on-linux-running-tomcat-works-fine

Backported to: 3.2.9

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 19, 2014

Bryan Turner commented

A patch which updates BufferedImageHttpMessageConverter to ignore empty strings: #491

@spring-projects-issues spring-projects-issues added type: bug status: backported in: web labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0.3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web status: backported type: bug
Projects
None yet
Development

No branches or pull requests

2 participants