On Monday 18 April 2016 15:47:19 Konrad Windszus wrote:
> No typo, I really meant "if and only if"
> (https://en.wikipedia.org/wiki/If_and_only_if
> <https://en.wikipedia.org/wiki/If_and_only_if>)

I know that page and after reading it again I'm pretty sure iff is wrong here.

Citation: "In logic and related fields such as mathematics and philosophy, if 
and only if (shortened iff) is a biconditional logical connective between 
statements."

Robert, was your remark for my commit a shot in the dark or do you really see 
"a biconditional logical connective between statements"?

I don't and I'm sure Konrads use of iff was just wrong, because isValid():
* returns true if there is no result at all
* returns true if all results are valid
* returns false if at least one result is not valid

I have removed the inline comment and added javadoc in r1743821. If you feel 
uncomfortable please change it yourself.

Regards,
O.

> > On 18 Apr 2016, at 15:45, Oliver Lietz <[email protected]> wrote:
> > 
> > On Monday 18 April 2016 16:13:56 Robert Munteanu wrote:
> >> On Thu, 2016-04-14 at 15:50 +0000, [email protected] wrote:
> >>> Author: olli
> >>> Date: Thu Apr 14 15:50:05 2016
> >>> New Revision: 1739128
> >>> 
> >>> URL: http://svn.apache.org/viewvc?rev=1739128&view=rev
> >>> Log:
> >>> fix typo in comment
> >>> 
> >>> Modified:
> >>>    sling/trunk/bundles/extensions/validation/core/src/main/java/org/
> >>> 
> >>> apache/sling/validation/impl/CompositeValidationResult.java
> >>> 
> >>> Modified:
> >>> sling/trunk/bundles/extensions/validation/core/src/main/java/org/apac
> >>> he/sling/validation/impl/CompositeValidationResult.java
> >>> URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/vali
> >>> dation/core/src/main/java/org/apache/sling/validation/impl/CompositeV
> >>> alidationResult.java?rev=1739128&r1=1739127&r2=1739128&view=diff
> >>> =====================================================================
> >>> =========
> >>> ---
> >>> sling/trunk/bundles/extensions/validation/core/src/main/java/org/apac
> >>> he/sling/validation/impl/CompositeValidationResult.java (original)
> >>> +++
> >>> sling/trunk/bundles/extensions/validation/core/src/main/java/org/apac
> >>> he/sling/validation/impl/CompositeValidationResult.java Thu Apr 14
> >>> 15:50:05 2016
> >>> @@ -49,7 +49,7 @@ public class CompositeValidationResult i
> >>> 
> >>>     @Override
> >>>     public boolean isValid() {
> >>> 
> >>> -        // this is only valid iff all aggregated results are valid
> >>> +        // this is only valid if all aggregated results are valid
> >> 
> >> Maybe this was not a typo? iff also stands for 'if and only if'
> > 
> > Konrad,
> > 
> > was it at typo or did you mean iff?
> > 
> > Robert, where do you see two statements?
> > 
> > Thanks,
> > O.
> > 
> >> Robert
> >> 
> >>>         for (ValidationResult result : results) {
> >>>         
> >>>             if (!result.isValid()) {
> >>>             
> >>>                 return false;

Reply via email to