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

sample-webapp throws java.lang.IllegalArgumentException #165

Closed
axelrose opened this issue Aug 29, 2019 · 1 comment
Closed

sample-webapp throws java.lang.IllegalArgumentException #165

axelrose opened this issue Aug 29, 2019 · 1 comment
Assignees

Comments

@axelrose
Copy link

Just some robustness on the sample webapp would be nice

If I open a fresh http://localhost:8080/jodconverter-sample-webapp/ and push "Convert!" without select some input file I get:

java.lang.IllegalArgumentException: Prefix string "" too short: length must be at least 3
        at java.base/java.io.File.createTempFile(File.java:2065)
        at java.base/java.io.File.createTempFile(File.java:2136)
        at org.jodconverter.sample.webapp.ConverterServlet.doPost(ConverterServlet.java:81)

Perhaps the code should just check for uploadedFile == "" too.

Thanks for making this such a nice project!
Axel.

@sbraconnier
Copy link
Member

Fixed.

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

2 participants