openpreserve / jhove

File validation and characterisation.
http://jhove.openpreservation.org
Other
161 stars 78 forks source link

Missing local messages in modules lead to InvocationTargetExceptions #894

Open rsteph-de opened 5 months ago

rsteph-de commented 5 months ago

Running JHove in a Non-English environment I ran into lots of InvocationTargetExceptions if localized messages were missing. Looking into the ErrorMessage_de.properties of different modules I discovered several issues with wrong / missing message properties. This led to NULL values in the corresponding MessageConstants enum.

1) As a quick fix you can already set a system property to force JHove to use the English messages.

System.setProperty("module.language", "en");

2) I am going to provide some corrections to the properties as Pull Request.

3) It would be good to have a fallback to the default message, if a message is missing for a certain language. This will usually happen when error messages are added or updated.