Class Suppression

java.lang.Object
com.minecolonies.api.util.constant.Suppression

public final class Suppression extends Object
Constants for suppression keys.
  • Field Details

    • UNCHECKED

      @NonNls public static final @NonNls String UNCHECKED
      Suppress warnings for unchecked type conversions.

      We sometimes need this for complicated typings.

      See Also:
    • RAWTYPES

      @NonNls public static final @NonNls String RAWTYPES
      Suppress warnings for raw type annotation.

      We sometimes need this for complicated typings.

      See Also:
    • DEPRECATION

      @NonNls public static final @NonNls String DEPRECATION
      Suppress warnings for deprecations.

      We sometimes need this for minecraft methods we have to keep support for.

      See Also:
    • EXCEPTION_HANDLERS_SHOULD_PRESERVE_THE_ORIGINAL_EXCEPTIONS

      @NonNls public static final @NonNls String EXCEPTION_HANDLERS_SHOULD_PRESERVE_THE_ORIGINAL_EXCEPTIONS
      We sometimes suppress this to ignore irrelevant error messages.

      Use this sparely!

      See Also:
    • CLASSES_SHOULD_NOT_ACCESS_STATIC_MEMBERS_OF_THEIR_OWN_SUBCLASSES_DURING_INITIALIZATION

      @NonNls public static final @NonNls String CLASSES_SHOULD_NOT_ACCESS_STATIC_MEMBERS_OF_THEIR_OWN_SUBCLASSES_DURING_INITIALIZATION
      We sometimes suppress this because we map static things.

      This is not ideal but needed sometimes.

      See Also:
    • UNUSED_METHOD_PARAMETERS_SHOULD_BE_REMOVED

      @NonNls public static final @NonNls String UNUSED_METHOD_PARAMETERS_SHOULD_BE_REMOVED
      We sometimes suppress this because sonar does not detect this.

      Overriding methods need the parameter.

      See Also:
    • INCREMENT_AND_DECREMENT_OPERATORS_SHOULD_NOT_BE_USED_IN_A_METHOD_CALL_OR_MIXED_WITH_OTHER_OPERATORS_IN_AN_EXPRESSION

      @NonNls public static final @NonNls String INCREMENT_AND_DECREMENT_OPERATORS_SHOULD_NOT_BE_USED_IN_A_METHOD_CALL_OR_MIXED_WITH_OTHER_OPERATORS_IN_AN_EXPRESSION
      We sometimes suppress this because we think this is more readable.

      Use this sparely!

      See Also:
    • MAGIC_NUMBERS_SHOULD_NOT_BE_USED

      @NonNls public static final @NonNls String MAGIC_NUMBERS_SHOULD_NOT_BE_USED
      We sometimes suppress this because we use number literals in switch statements.

      Use this sparely!

      See Also:
    • BIG_CLASS

      @NonNls public static final @NonNls String BIG_CLASS
      We sometimes suppress this because it would be silly to split up the classes.

      Use this sparely!

      See Also:
    • SPLIT_CLASS

      @NonNls public static final @NonNls String SPLIT_CLASS
      Sometimes classes are used in many places.
      See Also:
    • LEFT_CURLY_BRACE

      @NonNls public static final @NonNls String LEFT_CURLY_BRACE
      Sometimes it would decrease the readability of the code.

      Use this sparely!

      See Also:
    • GENERIC_WILDCARD

      @NonNls public static final @NonNls String GENERIC_WILDCARD
      Yeah generics are complicated. No reason to not use fully though.
      See Also:
    • OVERRIDE_EQUALS

      @NonNls public static final @NonNls String OVERRIDE_EQUALS
      Sometimes we don't need to override the equals of subclasses. (Building IDS are unique enough for equals for example).
      See Also:
    • TOO_MANY_RETURNS

      @NonNls public static final @NonNls String TOO_MANY_RETURNS
      Sometimes it is just needed to have many returns so the code is easily readable.
      See Also: