Netflix/mantis

Fix compile warnings in mantis-runtime module

liuml07 opened this issue · 8 comments

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 I would like to work on this issue.

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.

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).

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

Yeah, feel free to break down problems

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

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

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?