drccrd commented on code in PR #3999:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3999#discussion_r4005304682


##########
packages/drools-lsp/drools-completion/src/main/java/org/drools/completion/JavaSourceTypeParser.java:
##########
@@ -255,40 +265,33 @@ private static void 
collectBodyMembers(List<JavaParser.ClassBodyDeclarationConte
                     boolean isStatic = hasStaticModifier(cbd.modifier());
                     for (JavaParser.VariableDeclaratorContext vd : 
fd.variableDeclarators().variableDeclarator()) {
                         String name = 
vd.variableDeclaratorId().identifier().getText();
-                        if (isStatic) {
-                            // Kept by name only: reachable as Type.NAME, but 
not a
-                            // property of a fact, so out of the member list.
-                            staticFieldsOut.add(name);
-                        } else {
-                            fieldsOut.add(new Field(name, type, null, 
Field.Origin.FIELD));
-                        }
+                        // A static is reachable as Type.NAME but is not a 
property
+                        // of a fact, so the two views stay disjoint.
+                        (isStatic ? staticFieldsOut : fieldsOut)
+                                .add(new Field(name, type, null, 
Field.Origin.FIELD));

Review Comment:
   Dimensions preserved in simplify: 
https://github.com/apache/incubator-kie-tools/pull/3999/commits/1bf836bf7adb1ce14788680218f2ca6bd5a312b6



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to