You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Felix Knecht <fe...@otego.com> on 2010/06/04 16:10:01 UTC

Is 'null' ever valid syntax?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I suppose this is either always true or false, right?

if ( attributeType.getSyntax().getSyntaxChecker().isValidSyntax( null ) )

http://people.apache.org/~felixk/shared-docs/xref/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.html#916
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwJCTkACgkQ2lZVCB08qHElmQCguqsL1rbCuaO6RGpcyedAfEqq
RYMAoJ4cX/HAqZy7fILR18aGcPLedmII
=hXAi
-----END PGP SIGNATURE-----

Re: Is 'null' ever valid syntax?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 6/4/10 4:37 PM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 06/04/10 16:32, Stefan Seelmann wrote:
>    
>> Felix Knecht wrote:
>>      
>>> I suppose this is either always true or false, right?
>>>
>>> if ( attributeType.getSyntax().getSyntaxChecker().isValidSyntax( null ) )
>>>
>>> http://people.apache.org/~felixk/shared-docs/xref/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.html#916
>>>        
>> No. For example the directory string syntax doesn't allow an empty
>> string, so in that case the syntax checker returns false. But the IA5
>> string syntax allows an empty string, in that case the syntax checker
>> returns false.
>>      
> I have no idea about the checkers, but an empty string isn't a null string.
>    

I think ( to be double checked) that we allow a Value to old either "" 
or null.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com



Re: Is 'null' ever valid syntax?

Posted by Felix Knecht <fe...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/04/10 16:32, Stefan Seelmann wrote:
> Felix Knecht wrote:
>> I suppose this is either always true or false, right?
>>
>> if ( attributeType.getSyntax().getSyntaxChecker().isValidSyntax( null ) )
>>
>> http://people.apache.org/~felixk/shared-docs/xref/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.html#916
> 
> No. For example the directory string syntax doesn't allow an empty
> string, so in that case the syntax checker returns false. But the IA5
> string syntax allows an empty string, in that case the syntax checker
> returns false.

I have no idea about the checkers, but an empty string isn't a null string.

Regards
Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwJD8IACgkQ2lZVCB08qHEKmQCdEhuBtJn4Z51HTMQ//dUOm7vz
w5IAn13NQhOfhJWOY2879a4ILMPzWEPm
=SUik
-----END PGP SIGNATURE-----

Re: Is 'null' ever valid syntax?

Posted by Stefan Seelmann <se...@apache.org>.
Felix Knecht wrote:
> I suppose this is either always true or false, right?
> 
> if ( attributeType.getSyntax().getSyntaxChecker().isValidSyntax( null ) )
> 
> http://people.apache.org/~felixk/shared-docs/xref/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.html#916

No. For example the directory string syntax doesn't allow an empty
string, so in that case the syntax checker returns false. But the IA5
string syntax allows an empty string, in that case the syntax checker
returns false.

Kind Regards,
Stefan


Re: Is 'null' ever valid syntax?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 6/4/10 4:10 PM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I suppose this is either always true or false, right?
>    
No. It depends on the AttributeType. Some accept null values, some 
don't. This is the reason we have such a test.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com