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

Convert all occurrences of static [public|protected] to [public|protected] static #1194

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

DennisHeimbigner
Copy link
Collaborator

@DennisHeimbigner DennisHeimbigner commented Jun 8, 2023

Description of Changes

In accord with this comment, this PR converts all occurrences of

"static public" to "public static"
and
"static protected" to "protected static"

There are a couple of spotLess changes as well.

Warning: It turn out there are a lot of occurrences of "static public", so this PR touches a lot of files.

The changes were made by two commands:

1. find . -name '*.java' -exec grep '^[\t ]*static[ ][ ]*public' '{}' \;
2. sed -i.bak2 -e 's|^\([\t ]*\)static[ ][ ]*protected|\1protected static|' <file>

Command 1 located all .java files containing "static public". Command 2 was applied to the files located by command 1; it converts "static public" to "public static". Similar commands were applied for "static protected".

PR Checklist

  • Link to any issues that the PR addresses
  • Add labels
  • Open as a draft PR until ready for review
  • Make sure GitHub tests pass
  • Make sure Jenkins tests pass
  • Mark PR as "Ready for Review"

@DennisHeimbigner DennisHeimbigner added the internal: conventions Issues related to convention support label Jun 8, 2023
@DennisHeimbigner DennisHeimbigner marked this pull request as draft June 8, 2023 21:20
@DennisHeimbigner DennisHeimbigner marked this pull request as ready for review June 9, 2023 03:27
In accord with this [comment](Unidata#1152 (review)), this PR converts all occurrences of
````
"static public" to "public static"
and
"static protected" to "protected static"
````
There are a couple of spotLess changes as well.

Warning: It turn out there are a lot of occurrences
of "static public", so this PR touches a lot of files.

The changes were made by two commands:
````
1. find . -name '*.java' -exec grep '^[\t ]*static[ ][ ]*public' '{}' \;
2. sed -i.bak2 -e 's|^\([\t ]*\)static[ ][ ]*protected|\1protected static|' <file>
````
Command 1 located all .java files containing "static public".
Command 2 was applied to the files located by command 1; it converts "static public" to "public static".
Similar commands were applied for "static protected".

## PR Checklist
<!-- This will become an interactive checklist once the PR is opened -->
- [X] Link to any issues that the PR addresses
- [X] Add labels
- [X] Open as a [draft PR](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
       until ready for review
- [X] Make sure GitHub tests pass
- [ ] Mark PR as "Ready for Review"
@haileyajohnson haileyajohnson merged commit 5457355 into Unidata:maint-5.x Jun 20, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal: conventions Issues related to convention support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants