commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Schumacher <pascalschumac...@gmx.net>
Subject Re: [lang] Boolean method names
Date Sat, 29 Apr 2017 08:22:58 GMT
Am 28.04.2017 um 09:26 schrieb Benedikt Ritter:
> Hello Mark,
>
>> Am 25.04.2017 um 23:23 schrieb Mark Dacek <mark@syberion.com>:
>>
>> Hello all -
>> Recently, LANG-1167 was merged into commons-lang. It hit me today 
>> that one
>> of these method names seems a little funky. The class in question is
>> ReflectionToStringBuilder :
>> *https://github.com/apache/commons-lang/blob/master/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java#L719-L729

>>
>> <https://github.com/apache/commons-lang/blob/master/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java#L719-L729>*

>>
>>
>> I added a boolean called "excludeNullValues" - this seems fairly
>> straightforward, but the generic getter for this would be called
>> "isExcludeNullValues".
>>
>> Is it acceptable/worthwhile to change the method name to something a 
>> little
>> more intuitive to the end-user? Maybe something like 
>> "excludesNullValues"
>> or "isExcludingNullValues“.
> JavaBeans convention can lead to strange names. I’d suggest to stick 
> to the convention. This will make it easier for tools to process the 
> properties.

Yes, let's stick to the convention, that is consistent with the rest of 
ReflectionToStringBuilder and commons-lang in general.

Cheers,
Pascal

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message