jai-imageio / jai-imageio-core

JAI ImageIO Core (without javax.media.jai dependencies)
Other
234 stars 87 forks source link

The build jar file does not contain the properties files required for I18N, resulting in NPE #57

Open DustinPT opened 5 years ago

DustinPT commented 5 years ago

java.lang.RuntimeException: java.lang.NullPointerException

at com.github.jaiimageio.impl.common.I18NImpl.getString(I18NImpl.java:75) at com.github.jaiimageio.impl.plugins.bmp.I18N.getString(I18N.java:51) at com.github.jaiimageio.impl.plugins.bmp.BMPImageReader.checkIndex(BMPImageReader.java:220) at com.github.jaiimageio.impl.plugins.bmp.BMPImageReader.read(BMPImageReader.java:724) at javax.imageio.ImageReader.read(ImageReader.java:939)

tballison commented 3 years ago

I just came across this in Apache Tika in prep for our 1.27 release. As @DustinPT points out, https://github.com/jai-imageio/jai-imageio-core/blob/master/src/main/java/com/github/jaiimageio/impl/plugins/bmp/properties is not packaged with the jar.

tballison commented 1 year ago

Added a temporary workaround in Tika: https://issues.apache.org/jira/browse/TIKA-4104

Thank you @DustinPT for the fix that we used as inspiration!