All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.squidjava.rules.squid.ModifiersOrderCheck.html Maven / Gradle / Ivy

The Java Language Specification recommends listing modifiers in the following order:

  • Annotations
  • public
  • protected
  • private
  • abstract
  • static
  • final
  • transient
  • volatile
  • synchronized
  • native
  • strictfp

Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order.

The following code:

static public void main(String[] args) {   // Non-Compliant
}

should be refactored into:

public static void main(String[] args) {   // Compliant
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy