You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2011/04/06 19:27:23 UTC
Should I remove unused constructors in Entry ?
Hi guys,
as I'm now reviewing the Entry classes, I'm wondering if we should keep
all the constructors we have, or if we would rather remove those we
don't use.
For instance, we have a couple of constrcutors which are never used :
DefaultEntry( Attribute...)
DefaultEntry( SchemaManager, Attribute...)
It creates an Entry from a list of Attribute instances.
It *might* be convenient, but we never ever use it. Should I keep it, or
should I remove the methods ? (YAGNI principle)
wdyt ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Should I remove unused constructors in Entry ?
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On 11 avr. 2011, at 14:30, Kiran Ayyagari wrote:
> Hi Pierre-Arnaud,
>
> yeah, back then I was only searching for a method with name
> *has*Attribute(), so thought it didn't exist.
> Later Emmanuel told me about the *contains*Attribute(),
Oh, ok. Héhé. :)
> P.S:- I would prefer both methods to start with either 'contains'
> or 'has' , just to avoid confusion, but no big deal.
That thing kind of confused me too. I agree with you completely.
Regards,
Pierre-Arnaud
> On Mon, Apr 11, 2011 at 5:40 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
>> Hi Kiran,
>> I think we already have equivalent methods for this.
>> It's just not called 'hasAttributeType' but 'contains( [multiple arguments]
>> )' and 'containsAttribute( AttributeType attributeType )'.
>> Is it was you were looking for?
>> Regards,
>> Pierre-Arnaud
>>
>> On 6 avr. 2011, at 20:50, Kiran Ayyagari wrote:
>>
>> sorry accidentlly pressed send button, so am thinking that it would be good
>> to have hasAttributetype() similar to hasObjectclass()
>>
>> On 07-Apr-2011 12:14 AM, "Kiran Ayyagari" <ka...@apache.org> wrote:
>>
>> +1 to delete, l don't think they are widely used. OTOH i think we should
>> have another method to check the presence of attributetyp
>>
>>>
>>> On 06-Apr-2011 10:57 PM, "Emmanuel Lecharny" <el...@gmail.com> wrote:
>>>
>>> Hi guys,
>>>
>>> as I...
>>
>>
>
>
>
> --
> Kiran Ayyagari
Re: Should I remove unused constructors in Entry ?
Posted by Kiran Ayyagari <ka...@apache.org>.
Hi Pierre-Arnaud,
yeah, back then I was only searching for a method with name
*has*Attribute(), so thought it didn't exist.
Later Emmanuel told me about the *contains*Attribute(),
P.S:- I would prefer both methods to start with either 'contains'
or 'has' , just to avoid confusion, but no big deal.
On Mon, Apr 11, 2011 at 5:40 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
> Hi Kiran,
> I think we already have equivalent methods for this.
> It's just not called 'hasAttributeType' but 'contains( [multiple arguments]
> )' and 'containsAttribute( AttributeType attributeType )'.
> Is it was you were looking for?
> Regards,
> Pierre-Arnaud
>
> On 6 avr. 2011, at 20:50, Kiran Ayyagari wrote:
>
> sorry accidentlly pressed send button, so am thinking that it would be good
> to have hasAttributetype() similar to hasObjectclass()
>
> On 07-Apr-2011 12:14 AM, "Kiran Ayyagari" <ka...@apache.org> wrote:
>
> +1 to delete, l don't think they are widely used. OTOH i think we should
> have another method to check the presence of attributetyp
>
>>
>> On 06-Apr-2011 10:57 PM, "Emmanuel Lecharny" <el...@gmail.com> wrote:
>>
>> Hi guys,
>>
>> as I...
>
>
--
Kiran Ayyagari
Re: Should I remove unused constructors in Entry ?
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Kiran,
I think we already have equivalent methods for this.
It's just not called 'hasAttributeType' but 'contains( [multiple arguments] )' and 'containsAttribute( AttributeType attributeType )'.
Is it was you were looking for?
Regards,
Pierre-Arnaud
On 6 avr. 2011, at 20:50, Kiran Ayyagari wrote:
> sorry accidentlly pressed send button, so am thinking that it would be good to have hasAttributetype() similar to hasObjectclass()
>
>
>> On 07-Apr-2011 12:14 AM, "Kiran Ayyagari" <ka...@apache.org> wrote:
>>
>> +1 to delete, l don't think they are widely used. OTOH i think we should have another method to check the presence of attributetyp
>>
>>
>> >
>> > On 06-Apr-2011 10:57 PM, "Emmanuel Lecharny" <el...@gmail.com> wrote:
>> >
>> > Hi guys,
>> >
>> > as I...
>>
>
Re: Should I remove unused constructors in Entry ?
Posted by Kiran Ayyagari <ka...@apache.org>.
sorry accidentlly pressed send button, so am thinking that it would be good
to have hasAttributetype() similar to hasObjectclass()
On 07-Apr-2011 12:14 AM, "Kiran Ayyagari" <ka...@apache.org> wrote:
+1 to delete, l don't think they are widely used. OTOH i think we should
have another method to check the presence of attributetyp
>
> On 06-Apr-2011 10:57 PM, "Emmanuel Lecharny" <el...@gmail.com> wrote:
>
> Hi guys,
>
> as I...
Re: Should I remove unused constructors in Entry ?
Posted by Kiran Ayyagari <ka...@apache.org>.
+1 to delete, l don't think they are widely used. OTOH i think we should
have another method to check the presence of attributetyp
On 06-Apr-2011 10:57 PM, "Emmanuel Lecharny" <el...@gmail.com> wrote:
Hi guys,
as I'm now reviewing the Entry classes, I'm wondering if we should keep all
the constructors we have, or if we would rather remove those we don't use.
For instance, we have a couple of constrcutors which are never used :
DefaultEntry( Attribute...)
DefaultEntry( SchemaManager, Attribute...)
It creates an Entry from a list of Attribute instances.
It *might* be convenient, but we never ever use it. Should I keep it, or
should I remove the methods ? (YAGNI principle)
wdyt ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com