Skip to content
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

Fix compile warnings in mantis-runtime module #396

Open
liuml07 opened this issue Mar 29, 2023 · 8 comments
Open

Fix compile warnings in mantis-runtime module #396

liuml07 opened this issue Mar 29, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@liuml07
Copy link
Contributor

liuml07 commented Mar 29, 2023

There are compile warnings in the code due to:

  • deprecated APIs
  • missing @Nullable/@NotNull annotations
  • incomplete javadocs
  • lambda can be replaced with method references
  • raw usage of generic types
  • unnecessary type parameters (like Map<String> m = new HashMap<String>())
  • anonymous class can be replaced with lambdas
  • ... and more.

We don't need to solve all of them, but a good coding exercise is to address most those compile warnings when possible. Guidelines are:

  1. Not change code logic, which should be addressed and filed PR separately
  2. Not change public interfaces (class, methods and fields) that would break other modules or applications. But it's safe to rename private fields or methods when necessary.
  3. Prefer readability to more concise code
  4. Improve tests in the module is welcome but not required
  5. Compile and pass all existing tests.

This tracks the effort for the mantis-runtime module to make the code change scoped. Note this module contains more code than other modules.

@liuml07 liuml07 added enhancement New feature or request good first issue Good for newcomers labels Mar 29, 2023
@GautamGottipati
Copy link

@liuml07 I would like to work on this issue.

@GautamGottipati
Copy link

Hi @liuml07 can you please tell me how to check for compile warnings in the code? Should I build the project using gradle build in the mantis-runtime directory.

@liuml07
Copy link
Contributor Author

liuml07 commented Mar 30, 2023

Building the top project will show compiler warnings for all modules. You can also check code warnings in IntelliJ IDE editor (open a .java file and check yellow marks on the right).

@GautamGottipati
Copy link

@liuml07 in mantis-runtime we have different modules like command, computation etc. Is it fine if I change and raise pr module by module.

@liuml07
Copy link
Contributor Author

liuml07 commented Mar 30, 2023

Yeah, feel free to break down problems

@GautamGottipati
Copy link

Made changes to module mantis-runtime/command resolving warnings like adding final keyword, converting lambda expression to method reference, and removing unnecessary initialization in PR #404

@GautamGottipati
Copy link

Hi @liuml07, can you please check PR #404 and confirm if I have done it right.

@Hudson-Pufferfish
Copy link

Hi @liuml07, is this issue still open and was it left by someone else? I'm a junior in college who interested in Netflix Summer 2024 SWE internship and Netflix open source, can I take over and continue working on this issue please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants