Type: New Feature
Resolution: Won't Fix
Affects Version/s: None
Fix Version/s: None
In a former issue (see linked issue) non-localized usage of APIException like these
where error messages were hard-coded was replaced by using message keys.
Since the APIException(String) constructor does not treat the given string as a message key the constructor which also expects a parameter object was used. Leading to code like this
Looking at the merge commit there are 141 occurrences where there is actually no need to pass a parameter array to the localized message but due to the behavior of the APIException(String) there is no other way around this.
change the APIException(String) implementation to
this will lookup the message string in message properties and if not found default to the message string.
Like this it should not affect existing non-localized usage but enable cleaner use of localized messages without the need for parametrization.