Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small issues with Spring Framework Code Style Guide [SPR-14352] #18924

Closed
spring-projects-issues opened this issue Jun 10, 2016 · 3 comments
Closed
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jun 10, 2016

Arend v. Reinersdorff opened SPR-14352 and commented

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 #16193 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.


Reference URL: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 10, 2016

Stéphane Nicoll commented

looks like I broke something in b3fe3273b5b10 - looking at it.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 10, 2016

Stéphane Nicoll commented

Thanks for the feedback. I also find the phrasing about line break confusing. Let me know if that helps.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 10, 2016

Arend v. Reinersdorff commented

Looks good. Thanks for the quick reply :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants