Ah yes, you're aiming to check that "neither OR both" are supplied. 
Let's leave it as is.

On 30 May 2014, at 0:51, Adam Cox wrote:

>> +            NSDictionary *userInfo = @{NSLocalizedDescriptionKey: 
>> NSLocalizedString(msg, nil)};
>> +            *error = [NSError 
>> errorWithDomain:CDTReplicationErrorDomain
>> +                                         
>> code:CDTReplicationErrorInvalidScheme
>> +                                     userInfo:userInfo];
>> +        }
>> +        return NO;
>> +
>> +    }
>> +
>> +    //edge case: need to invalidate URLs like 
>> 'https://:password@myurl.com' and 'https://adam:@myurl.com'
>> +    // or not???
>> +    BOOL goodUser = self.remoteDatastore.user != nil && 
>> ![self.remoteDatastore.user isEqualToString:@""];
>> +    BOOL goodPass = self.remoteDatastore.password != nil && 
>> ![self.remoteDatastore.password isEqualToString:@""];
>> +
>> +    if ( (goodUser && !goodPass)  ||
>> +         (!goodUser && goodPass) ) {
>
> I don't think it is...
>
> false && false == false, right?
>
> I want a NOT XOR.  I could do !(goodUser ^ goodPass)...
>
>
>
> From:	Mike Rhodes <notifications@github.com>
> To:	cloudant/CDTDatastore <CDTDatastore@noreply.github.com>
> Cc:	Adam Cox <gadamc@cloudant.com>
> Date:	05/29/2014 03:07
> Subject:	Re: [CDTDatastore] Adds support for filtered pull 
> replication.
>          (#23)
>
>
>
> In Classes/common/CDTReplicator/CDTAbstractReplication.m:
>
>
>> +            NSDictionary *userInfo = @{NSLocalizedDescriptionKey:
> NSLocalizedString(msg, nil)};
>> +            *error = [NSError 
>> errorWithDomain:CDTReplicationErrorDomain
>> +
> code:CDTReplicationErrorInvalidScheme
>> +                                     userInfo:userInfo];
>> +        }
>> +        return NO;
>> +
>> +    }
>> +
>> +    //edge case: need to invalidate URLs like
> 'https://:password@myurl.com' and 'https://adam:@myurl.com'
>> +    // or not???
>> +    BOOL goodUser = self.remoteDatastore.user != nil
> && ![self.remoteDatastore.user isEqualToString:@""];
>> +    BOOL goodPass = self.remoteDatastore.password != nil
> && ![self.remoteDatastore.password isEqualToString:@""];
>> +
>> +    if ( (goodUser && !goodPass)  ||
>> +         (!goodUser && goodPass) ) {
>
>
>
> if (!(goodUser && goodPass)) is logically equivalent.
>
>
> —
> Reply to this email directly or view it on GitHub.
>
>
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/cloudant/CDTDatastore/pull/23/files#r13211245