[
https://issues.apache.org/jira/browse/GEODE-8882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17273970#comment-17273970
]
ASF GitHub Bot commented on GEODE-8882:
---------------------------------------
rhoughton-pivot commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566375472
##########
File path:
buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
##########
@@ -272,5 +272,10 @@ class DependencyConstraints implements Plugin<Project> {
dependencySet(group: 'org.springframework.session', version: '2.4.1') {
entry('spring-session-data-redis')
}
+
Review comment:
Are we expecting to have more modules from `org.jetbrains` in the
product? If not, then the syntax above for individual modules is a little
cleaner.
##########
File path: geode-common/build.gradle
##########
@@ -26,6 +26,7 @@ dependencies {
implementation(platform(project(':boms:geode-all-bom')))
implementation('com.fasterxml.jackson.core:jackson-databind')
+ api('org.jetbrains:annotations')
Review comment:
@kohlmu-pivotal wanted the same thing: to have a java project or .gradle
file, whose only goal was to make it easy for other Geode subprojects to get
dependencies. Maybe he found a solution?
----------------------------------------------------------------
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)