> On 27 Feb 2017, at 10:28, Oliver Lietz <[email protected]> wrote:
> 
> On Monday 27 February 2017 08:00:14 Konrad Windszus wrote:
>> Hey, I don't really think the change for that in
>> https://svn.apache.org/viewvc/sling/trunk/bundles/extensions/validation/api
>> /src/main/java/org/apache/sling/validation/spi/DefaultValidationFailure.java
>> ?r1=1734530&r2=1784472&pathrev=1784472 was good. The resourceBundle
>> parameter is marked as @Nonnull. If you give a null here the return value
>> is useless (because the key cannot be resolved against the MessageBundle).
>> Your change makes it harder to detect such programming errors during
>> development, because you no longer throw a (noisy) exception, but rather
>> fall back to a IMHO useless default (empty string) which is rather
>> unexpected.
>> 
>> What is the reason for that change?
> 
> Hi Konrad,
> 
> checking for null allows validation even if resource bundle is missing.
> I don't think validation should stop working just because human readable 
> message is missing.
Yes I agree, but then your code should not call that specific method.
Where exactly in your code is it called with ResourceBundle = null?

> 
> Regards,
> O.
> 
>> Thanks,
>> Konrad
>> 
>>> On 26 Feb 2017, at 20:04, Oliver Lietz (JIRA) <[email protected]> wrote:
>>>    [
>>>    https://issues.apache.org/jira/browse/SLING-6569?page=com.atlassian.j
>>>    ira.plugin.system.issuetabpanels:all-tabpanel ]> 
>>> Oliver Lietz resolved SLING-6569.
>>> ---------------------------------
>>> 
>>>   Resolution: Fixed
>>> 
>>> [r1784472|https://svn.apache.org/r1784472]
>>> 
>>>> NPE in DefaultValidationFailure when resource bundle is null
>>>> ------------------------------------------------------------
>>>> 
>>>>               Key: SLING-6569
>>>>               URL: https://issues.apache.org/jira/browse/SLING-6569
>>>> 
>>>>           Project: Sling
>>>> 
>>>>        Issue Type: Bug
>>>>        Components: Extensions, Validation
>>>> 
>>>>          Reporter: Oliver Lietz
>>>>          Assignee: Oliver Lietz
>>>> 
>>>>           Fix For: Validation 1.0.0
>>> 
>>> --
>>> This message was sent by Atlassian JIRA
>>> (v6.3.15#6346)
> 
> 

Reply via email to