RESTWS-871: Follow naming convention for constants#549
RESTWS-871: Follow naming convention for constants#549dkayiwa merged 22 commits intoopenmrs:masterfrom docjon09:RESTWS-871
Conversation
| public abstract class ITBase { | ||
|
|
||
| private static final Object serverStartupLock = new Object(); | ||
| private static final Object SERVER_STARTUP_LOCK = new Object(); |
There was a problem hiding this comment.
@docjon09 are you sure serverStartupLock is a variable?
There was a problem hiding this comment.
I didn't knew objects aren't considered variables. I have updated it now. Thanks.
* Update ITBase.java * Update OpenmrsClassScanner.java
|
Is the ticket url correct? |
oh sorry, it is not. Have changed it now. |
I have updated the ticket link now. |
|
What about the commit message? |
I can't change it now, right? |
|
What about editing it to a preferred commit message? Don't you have the editing privilege on this PR? |
|
Isn't there any variable that has been left out? |
I have capitalized the names of all variables with keyword 'static final'. But I have left the 'final' variables unchanged as some websites say that they need not be capitalized. |
Could you share the link to the documentation? |
https://softwareengineering.stackexchange.com/q/252243 |
Is this link of help? https://www.thoughtco.com/constant-2034049#:~:text=A%20constant%20is%20a%20variable,read%20and%20understood%20by%20others. |
|
Hey @docjon09, I noticed that there are some pending changes in this PR. Are there any updates on when it will be completed? Let me know if there's anything I can do to help move it forward. |
Sorry, I forgot about this. |
|
Hi @docjon09, Thank you for bringing this to our attention. You are correct that according to the Oracle Java Code Conventions, all class constants should be capitalized, but for instance final variables that are not static, Oracle does not have any specific guidelines on whether to use uppercase or lowercase letters. Let's get this PR merged first. We apologize for the confusion and any inconsistencies in our naming conventions. I will make sure to review and update our docs accordingly to ensure consistency and compliance with industry standards. Thanks again for bringing this to our attention. ❤️ |
Description of what I changed
Changed names of constant variables to follow the naming convention
Issue I worked on
see https://issues.openmrs.org/browse/RESTWS-871
Checklist: I completed these to help reviewers :)
My pull request only contains ONE single commit
(the number above, next to the 'Commits' tab is 1).
No? -> read here on how to squash multiple commits into one
My IDE is configured to follow the code style of this project.
No? Unsure? -> configure your IDE, format the code and add the changes with
git add . && git commit --amendI have added tests to cover my changes. (If you refactored
existing code that was well tested you do not have to add tests)
No? -> write tests and add them to this commit
git add . && git commit --amendI ran
mvn clean packageright before creating this pull request andadded all formatting changes to my commit.
No? -> execute above command
All new and existing tests passed.
No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.
My pull request is based on the latest changes of the master branch.
No? Unsure? -> execute command
git pull --rebase upstream master