[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463927#comment-16463927
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10362:
---------------------------------------------

DaanHoogland commented on issue #2600: CLOUDSTACK-10362: Change the "getXXX" 
method names to "isXXX".
URL: https://github.com/apache/cloudstack/pull/2600#issuecomment-386613917
 
 
   these test resulta are dissappointing so i did a recursive case insensitive 
search of the changed method names:
   for i in 
getOfferHa,isOfferHa,GetLimitCpuUse,isLimitCpuUse,getVolatileVm,isVolatileVm,getForVirtualNetwork,isForVirtualNetwork,getIsSourceNat,isSourceNat,getIsStaticNat,isStaticNat,getRestartRequired,isRestartRequired,getSpecifyIpRanges,isSpecifyIpRanges,getDisplayVm,isDisplayVm,getDisplayVpc,isDisplayVpc,getLocalStorageActive,isLocalStorageActive,getHasEnoughCapacity,hasEnoughCapacity,getSuitableForMigration,isSuitableForMigration,getDefaultUse,isDefaultUse,getForDisplay,isForDisplay,getDestroyed,isDestroyed,getListAll,isListAll,getSparseVolumes,isSparseVolumes,getPasswordEnabled,isPasswordEnabled,getRequiresHVM,isRequiresHVM,getIsPublic,isPublic,getFeatured,isFeatured,getIsExtractable,isExtractable,getBootable,isBootable,getSshKeyEnabled,isSshKeyEnabled
   do
     grep -ir $i *
   done
   ```
   baloujak:pr2600-t2589-kvm-centos7 dahn$ for i in 
getOfferHa,isOfferHa,GetLimitCpuUse,isLimitCpuUse,getVolatileVm,isVolatileVm,getForVirtualNetwork,isForVirtualNetwork,getIsSourceNat,isSourceNat,getIsStaticNat,isStaticNat,getRestartRequired,isRestartRequired,getSpecifyIpRanges,isSpecifyIpRanges,getDisplayVm,isDisplayVm,getDisplayVpc,isDisplayVpc,getLocalStorageActive,isLocalStorageActive,getHasEnoughCapacity,hasEnoughCapacity,getSuitableForMigration,isSuitableForMigration,getDefaultUse,isDefaultUse,getForDisplay,isForDisplay,getDestroyed,isDestroyed,getListAll,isListAll,getSparseVolumes,isSparseVolumes,getPasswordEnabled,isPasswordEnabled,getRequiresHVM,isRequiresHVM,getIsPublic,isPublic,getFeatured,isFeatured,getIsExtractable,isExtractable,getBootable,isBootable,getSshKeyEnabled,isSshKeyEnabled
   > do
   >   grep -ir $i *
   > done
   baloujak:pr2600-t2589-kvm-centos7 dahn$
   ```
   
   no results are good results. I think we can go agead with this @rhtyd 
@rafaelweingartner ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method names
> -------------------------
>
>                 Key: CLOUDSTACK-10362
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10362
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: KuiLIU
>            Priority: Major
>
> Some Boolean-return methods are named "getXXX",
> but other Boolean-return methods are named "isXXX", such as the following two 
> methods.
> They will return boolean values, rename them as "isXXX" should be more clear 
> than "getXXX".
> api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java
> {code:java}
>      public Boolean getForVirtualNetwork() {
>          return forVirtualNetwork;
>      }
> {code}
> api/src/main/java/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
> {code:java}
>     public Boolean isForVirtualNetwork() {
>         return forVirtualNetwork;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to