fernando88to commented on code in PR #445:
URL: 
https://github.com/apache/grails-intellij-plugin/pull/445#discussion_r4265989011


##########
plugin/src/main/java/org/apache/grails/intellij/plugin/util/GrailsArtifact.java:
##########
@@ -80,7 +81,16 @@ public enum GrailsArtifact {
   DOMAIN(NotNullLazyValue.createValue(() -> AllIcons.Nodes.DataTables), "", 
"domain"),
   CONTROLLER(NotNullLazyValue.createValue(() -> AllIcons.Nodes.Controller), 
"Controller", "controllers"),
   TAGLIB(NotNullLazyValue.createValue(() -> GroovyMvcIcons.Taglib), "TagLib", 
"taglib"),
-  SERVICE(NotNullLazyValue.createValue(() -> AllIcons.FileTypes.Config), 
"Service", "services"),
+  SERVICE(NotNullLazyValue.createValue(() -> AllIcons.FileTypes.Config), 
"Service", "services") {
+    /**
+     * A GORM data service is an interface annotated with {@code 
grails.gorm.services.Service}; GORM
+     * generates the implementation at compile time, so the interface is the 
only source artefact.

Review Comment:
   The javadoc says "annotated with `grails.gorm.services.Service`", but the 
code accepts any
     interface and never checks the annotation. A quick test confirms that a 
plain
     `interface PricingService` without `@Service` under `grails-app/services` 
is recognised as a
     service. I think not requiring the annotation is right, since it may not 
resolve, but the comment
     should say so:
   
     ```suggestion
          * A GORM data service ({@code @Service(Domain) interface FooService}) 
is an interface whose
          * implementation GORM generates at compile time. The annotation is 
not checked: any interface
          * named {@code *Service} under {@code grails-app/services} is a 
service artefact.
     ```



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to