[ 
https://issues.apache.org/jira/browse/GEODE-8882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17273276#comment-17273276
 ] 

ASF GitHub Bot commented on GEODE-8882:
---------------------------------------

pivotal-jbarrett commented on pull request #5967:
URL: https://github.com/apache/geode/pull/5967#issuecomment-768767322


   Awesome! Not only did it find a bug but that there was no test coverage for 
that case. Can you fix both issue in this PR?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Introduce JetBrains @NotNull Annotation Support
> -----------------------------------------------
>
>                 Key: GEODE-8882
>                 URL: https://issues.apache.org/jira/browse/GEODE-8882
>             Project: Geode
>          Issue Type: Task
>          Components: build, tools
>            Reporter: Bill Burcham
>            Assignee: Bill Burcham
>            Priority: Major
>              Labels: pull-request-available
>
> In [2017 a couple committers 
> discussed|https://markmail.org/search/?q=list%3Aorg.apache.geode.dev+order%3Adate-backward+notnull#query:list%3Aorg.apache.geode.dev%20order%3Adate-backward%20notnull+page:1+mid:daov733nyw5xbhps+state:results]
>  using the JetBrains {{@NotNull}} annotation in Geode.
> More recently, in [PR #5947|https://github.com/apache/geode/pull/5947/files#] 
> there was agreement that the {{@NotNull}} annotation would improve the 
> documentation and development-time (IDE) static analysis of the 
> {{SocketMessageWriter.writeHandshakeMessage()}} method signature. 
> Specifically, there was a question whether it was ok to remove a null-check 
> on the {{clientVersion}} parameter.
> When this task is complete, {{geode-common}} will have a new {{api()}} 
> dependency on [JetBrains Java 
> Annotations|https://github.com/JetBrains/java-annotations]. As a result, 
> Gradle subprojects that depend on {{geode-common}} will also be able to 
> reference the annotations.
> Also the method just mentioned will have this signature (as a demonstration 
> that the new annotation works):
> {code}
>   public void writeHandshakeMessage(DataOutputStream dos, byte type, String 
> p_msg,
>       @NotNull final KnownVersion clientVersion, byte endpointType, int 
> queueSize)
>       throws IOException {
> {code}
> The benefit will be that IntelliJ code inspections will flag (some) 
> situations where we are passing nullable references where they aren't 
> expected. This will entail adding more annotations. This PR merely enables 
> that work, and the attendant static analysis.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to