Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-14352

Small issues with Spring Framework Code Style Guide

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: [Documentation]
    • Labels:
      None

      Description

      1. "Source files must be encoded using -1"

      Was ISO-8859-1 before.

      2. "see <nothing> for a suggestion to move to UTF-8"

      Was a link to https://jira.spring.io/browse/SPR-11569 before.

      3. Section on Braces not clear

      • "Line break after the closing brace [...] with the exception of the else, catch and finally statements [...]"
      • Example below shows line breaks between closing brace and else:
      if (condition()) {
          something();
      }
      else {
          // ...
      }
      

      Reads like a contradiction between the description and the example to me. But maybe I misread the sentence, I find it hard to understand. Maybe it could be clarified?

      Suggestion (assuming the example is correct):

      • Line break after the closing brace if that brace terminates a statement or the body of a method, constructor, or named class
      • Line break before else, catch and finally statements

      4. Deletion of content

      On Feb 20, 2016 a lot of content was deleted from the style guide, eg Constant names, Ternary operator, @Override. I'm not sure if this was on purpose.

        Attachments

          Activity

            People

            Assignee:
            snicoll St├ęphane Nicoll
            Reporter:
            arend.von.reinersdorff Arend v. Reinersdorff
            Last updater:
            Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 16 weeks, 2 days ago