Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8928

Reduce code quality warnings in generated code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 3.5.8, 3.6.3, 4.0.4
    • Soap Binding
    • None
    • Novice

    Description

      The cxf-codegen-plugin converts a WSDL into java classes, among them the class for the Jax-WS Service.

      In the template some class members have the modifiers "public final static". The java standard recommends them to be in the order "public static final"

      > If two or more (distinct) field modifiers appear in a field declaration, it is customary, though not required, that they appear in the order consistent with that shown above in the production for FieldModifier. – https://docs.oracle.com/javase/specs/jls/se20/html/jls-8.html#jls-8.3.1

       

      If the generated source code is checked in to source control it is common that it will be analyzed using checkstyle, Teamscale and other linters. To reduce linter complaints the order should be changed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              glysbaysb Geert Ijewski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: