-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CLOUDSTACK-10365: Change the "getXXX" boolean-related method names to… #2602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ public enum StorageType { | |
| /** | ||
| * @return Does this service plan offer HA? | ||
| */ | ||
| boolean getOfferHA(); | ||
| boolean isOfferHA(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the java doc implies it should be called doesOfferHA()
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DaanHoogland I would prefer to only have methods starting with either get or is.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good point @fmaximus so the generic dao breaks if we go any other way is your message, is it?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know the name of the class that does this interception, so we can inspect it? |
||
|
|
||
| /** | ||
| * @return Does this service plan offer VM to use CPU resources beyond the service offering limits? | ||
|
|
@@ -86,7 +86,7 @@ public enum StorageType { | |
| /** | ||
| * @return Does this service plan support Volatile VM that is, discard VM's root disk and create a new one on reboot? | ||
| */ | ||
| boolean getVolatileVm(); | ||
| boolean isVolatileVm(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. supportVolitileVMs() would be more pleasing on the human eye. Not that that should hamper this change but what is the objective? to adhere to another naming convention or to make better code for reading? and seriously both are valid motives under circumstances, but I am really wondering.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The intention of my pull requests is to make code more readable and understandable, thus further making developers to understand the code more easily with method names without more context information.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @brucekuiliu I am with 2 all the way, with the exception of the use of these methods in code generation tools. In this last method I would expect a name like isForVolatileVms() or the ealier sugested name. Of cause the accessor is named after the field implying that the field is not properly named either. |
||
|
|
||
| /** | ||
| * @return the rate in megabits per sec to which a VM's network interface is throttled to | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the is prefix for in this case? is the question enableRRS() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not
enableRSSgive the idea that it is a method that "enables" RSS?At least, that is what sounds to me.