-
Notifications
You must be signed in to change notification settings - Fork 482
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
Feature Request/Idea:Code optimization suggestions #8771
Comments
@noobyu6 are you using a tool to find these? If so, which one, please? |
I am a researcher from Fudan University and developing a tool working on this. And I hope my suggestion is helpful! |
Hello? So, are my suggestions helpful to your project? |
Well, sort of? 😄 We always appreciate feedback on our code and "continue to increase the quality of the software" is one of our strategic goals that we list at https://www.iq.harvard.edu/roadmap-dataverse-project However, every time we change code we review and re-test it, so it's not "free" in terms of time to make changes. As far as I know, all the Java classes you mentioned are working fine. I'm not sure what to suggest. Some possible avenues:
I'd love to hear more of your thoughts! And thoughts from other developers, of course. 😄 What's the best way to clean up a code base? |
thanks for your reply, i have made a new pr |
Head up that there's a new column called "SonarQube cleanup" at https://github.com/orgs/IQSS/projects/34/views/1 Related: |
Overview of the Feature Request
Some fields can be replaced by local variables
What kind of user is the feature intended for?
(Example users roles: API User, Curator, Depositor, Guest, Superuser, Sysadmin)
What inspired the request?
What existing behavior do you want changed?
Any brand new behavior do you want to add to Dataverse?
Any related open or closed issues to this feature request?
Hi,
I find that the private field cm at Line 20 in the file 'dataverse/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/SWORDv2ContainerServlet.java' on the master branch is only assigned and used in the method init. Therefore, this field can be removed from the class, and become a local variable in the method init. This transformation will normally reduce memory usage and improve readability of your code.
Besides, there are other fields like this.I sorted them out and put them in the table below.I will be happy if this transformation is helpful.
The text was updated successfully, but these errors were encountered: