AuthMe/AuthMeReloaded

View on GitHub
src/main/java/fr/xephi/authme/datasource/mysqlextensions/MySqlExtension.java

Summary

Maintainability
A
0 mins
Test Coverage

Variable 'tableName' must be private and have accessor methods.
Open

    protected final String tableName;

Checks visibility of class members. Only static final, immutable or annotatedby specified annotation members may be public; other class members must be privateunless the property protectedAllowed or packageAllowed is set.

Public members are not flagged if the name matches the publicmember regular expression (contains "^serialVersionUID$" by default).

Note thatCheckstyle 2 used to include "^f[A-Z][a-zA-Z0-9]*$" in the defaultpattern to allow names used in container-managed persistence for Enterprise JavaBeans(EJB) 1.1 with the default settings. With EJB 2.0 it is no longer necessary to havepublic access for persistent fields, so the default has been changed.

Rationale: Enforce encapsulation.

Check also has options making it less strict:

ignoreAnnotationCanonicalNames - the list of annotations which ignore variablesin consideration. If user will provide short annotation name that type will match to anynamed the same type without consideration of package.

allowPublicFinalFields - which allows public final fields.

allowPublicImmutableFields - which allows immutable fields to be declared aspublic if defined in final class.

Field is known to be immutable if:

  • It's declared as final
  • Has either a primitive type or instance of class user defined to be immutable(such as String, ImmutableCollection from Guava and etc)

Classes known to be immutable are listed in immutableClassCanonicalNames by theircanonical names.

Property Rationale: Forcing all fields of class to have private modifier by default isgood in most cases, but in some cases it drawbacks in too much boilerplate get/set code.One of such cases are immutable classes.

Restriction: Check doesn't check if class is immutable, there's nochecking if accessory methods are missing and all fields are immutable, we only checkif current field is immutable or final. Under the flagallowPublicImmutableFields, the enclosing class must also be final, to encourageimmutability. Under the flag allowPublicFinalFields, the final modifier onthe enclosing class is optional.

Star imports are out of scope of this Check. So if one of type imported viastar import collides with user specified one by its short name -there won't be Check's violation.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Variable 'col' must be private and have accessor methods.
Open

    protected final Columns col;

Checks visibility of class members. Only static final, immutable or annotatedby specified annotation members may be public; other class members must be privateunless the property protectedAllowed or packageAllowed is set.

Public members are not flagged if the name matches the publicmember regular expression (contains "^serialVersionUID$" by default).

Note thatCheckstyle 2 used to include "^f[A-Z][a-zA-Z0-9]*$" in the defaultpattern to allow names used in container-managed persistence for Enterprise JavaBeans(EJB) 1.1 with the default settings. With EJB 2.0 it is no longer necessary to havepublic access for persistent fields, so the default has been changed.

Rationale: Enforce encapsulation.

Check also has options making it less strict:

ignoreAnnotationCanonicalNames - the list of annotations which ignore variablesin consideration. If user will provide short annotation name that type will match to anynamed the same type without consideration of package.

allowPublicFinalFields - which allows public final fields.

allowPublicImmutableFields - which allows immutable fields to be declared aspublic if defined in final class.

Field is known to be immutable if:

  • It's declared as final
  • Has either a primitive type or instance of class user defined to be immutable(such as String, ImmutableCollection from Guava and etc)

Classes known to be immutable are listed in immutableClassCanonicalNames by theircanonical names.

Property Rationale: Forcing all fields of class to have private modifier by default isgood in most cases, but in some cases it drawbacks in too much boilerplate get/set code.One of such cases are immutable classes.

Restriction: Check doesn't check if class is immutable, there's nochecking if accessory methods are missing and all fields are immutable, we only checkif current field is immutable or final. Under the flagallowPublicImmutableFields, the enclosing class must also be final, to encourageimmutability. Under the flag allowPublicFinalFields, the final modifier onthe enclosing class is optional.

Star imports are out of scope of this Check. So if one of type imported viastar import collides with user specified one by its short name -there won't be Check's violation.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

There are no issues that match your filters.

Category
Status