You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "upthewaterspout (GitHub)" <gi...@apache.org> on 2019/02/04 23:55:04 UTC

[GitHub] [geode] upthewaterspout opened pull request #3160: Marking static variables final that are never modified

To help reduce the number of mutable statics to look through, adding
final to all of the statics that are not actually mutated outside of a
static initializer.

This change *only* consists of adding final to these variables.

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

- [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?

- [ ] Is your initial contribution a single, squashed commit?

- [ ] Does `gradlew build` run cleanly?

- [ ] Have you written or updated unit tests to verify your changes?

- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.


[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] upthewaterspout closed pull request #3160: Marking static variables final that are never modified

Posted by "upthewaterspout (GitHub)" <gi...@apache.org>.
[ pull request closed by upthewaterspout ]

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] upthewaterspout commented on issue #3160: Marking static variables final that are never modified

Posted by "upthewaterspout (GitHub)" <gi...@apache.org>.
@Bill 

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] pivotal-jbarrett commented on issue #3160: Marking static variables final that are never modified

Posted by "pivotal-jbarrett (GitHub)" <gi...@apache.org>.
@upthewaterspout The commit needs a JIRA

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] kirklund commented on pull request #3160: Marking static variables final that are never modified

Posted by "kirklund (GitHub)" <gi...@apache.org>.
SESSION_STATISTICS_MBEAN_NAME should be changed to package-private.

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] kirklund commented on pull request #3160: Marking static variables final that are never modified

Posted by "kirklund (GitHub)" <gi...@apache.org>.
GEMFIRE_SESSION_REQUEST is unused and should be deleted.

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] upthewaterspout commented on pull request #3160: Marking static variables final that are never modified

Posted by "upthewaterspout (GitHub)" <gi...@apache.org>.
Good catch! I must have accidentally removed final from this ordinal while I was fixing compilation errors related to adding other final clauses (I tried to make nextOrdinal final). I double checked the diff, this is the only place I removed final from something that was. I'll fix it.

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] kirklund commented on pull request #3160: Marking static variables final that are never modified

Posted by "kirklund (GitHub)" <gi...@apache.org>.
Why remove final from `public int ordinal` if there's no code that reassigns it?

If this is the fix for a serialization bug, then I suggest filing a separate ticket and PR for that bug with a test for it.

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] Bill commented on pull request #3160: Marking static variables final that are never modified

Posted by "Bill (GitHub)" <gi...@apache.org>.
recommend reformatting as a multi-line comment

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] kirklund commented on pull request #3160: Marking static variables final that are never modified

Posted by "kirklund (GitHub)" <gi...@apache.org>.
percentInactiveTimeTriggerRebuild is unused and should be deleted.

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] kirklund commented on pull request #3160: Marking static variables final that are never modified

Posted by "kirklund (GitHub)" <gi...@apache.org>.
This constant is never used outside the class and can also be changed to `private`

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] Bill commented on pull request #3160: Marking static variables final that are never modified

Posted by "Bill (GitHub)" <gi...@apache.org>.
reformatting of this comment seems bad. I recommend that you either format it as a multi-line comment, or that you remove the comment entirely

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] galen-pivotal commented on issue #3160: Marking static variables final that are never modified

Posted by "galen-pivotal (GitHub)" <gi...@apache.org>.
If tests and build pass, I don't know what can go wrong! (apart from reflection... but I think the JVM will guarantee that it won't fail even if it un-JITs some stuff?)

[ Full content available at: https://github.com/apache/geode/pull/3160 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org