Contributing

Guidelines for contributing to this project.

Pull requests have some guidelines before being approved.

Code Guidelines

  1. Any new addition of a variable must include final

  2. Static-abuse: static should only be used if a class requires a helper method, such as merging strings or parsing a string to an object. There is no other reason to use static.

  3. Any new addition of a method must include:

    • Annotations: If a method returns something, mark it as either @NotNull or @Nullabledepending on the outcome.

    • Documentation: Explain what this method does, what it returns, what it MAY throw, what params are needed.

    • Parameters: Parameters will need the @NotNull or @Nullable annotation, if the parameter is a primitive you must use final.

  4. You cannot "optimize" a method / change internal code unless it is stated that you can make a PR to clean it up, there is very few points of this within the Wrapper, so only use contributions for new features and follow the guidelines.

Java is not C#

When talking about "Java is not C#", we are talking about curly braces & method/variable names.

Bad:

Good:

No curly braces in one-line returns

Bad:

Good:

Invokation of a method

When invoking a method and the method depends on another method in the class, you must always use this.

Bad:

Good:

Re-use of variables

Bad:

Good:

Nesting

Bad:

Good:

Last updated

Was this helpful?