yesamer commented on code in PR #6261:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6261#discussion_r1967617331


##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/types/GenFnType.java:
##########
@@ -69,13 +67,22 @@ public String getName() {
 
     @Override
     public boolean conformsTo(Type t) {
-        if (t instanceof GenFnType) {
-            GenFnType fnT = (GenFnType) t;
+        if (t instanceof GenFnType fnT) {
             return fnT.argsGen.size() == this.argsGen.size() &&
-                   IntStream.range(0, argsGen.size()).allMatch(i -> 
fnT.argsGen.get(i).conformsTo(this.argsGen.get(i))) &&
-                   this.returnGen.conformsTo(fnT.returnGen);
+                    IntStream.range(0, argsGen.size()).allMatch(i -> 
fnT.argsGen.get(i).conformsTo(this.argsGen.get(i))) &&
+                    this.returnGen.conformsTo(fnT.returnGen);
         } else {

Review Comment:
   @bncriju Please remove those  2 whitespaces



##########
kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/lang/types/GenFnTypeTest.java:
##########
@@ -0,0 +1,228 @@
+/*
+ *

Review Comment:
   @bncriju Please remove line 2



##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/types/GenFnType.java:
##########
@@ -1,4 +1,5 @@
-/**
+/*
+ *

Review Comment:
   @bncriju Please remove line 2



##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/types/GenFnType.java:
##########
@@ -40,18 +41,15 @@ public GenFnType(List<Type> argsGen, Type returnGen) {
 
     @Override
     public boolean isInstanceOf(Object o) {
-        if (o instanceof FEELFunction) {
-            FEELFunction oFn = (FEELFunction) o;
-            List<List<Param>> signatures = 
oFn.getParameters().stream().filter(signature -> signature.size() == 
argsGen.size()).collect(Collectors.toList());
-            for (List<Param> signature : signatures) {
-                if (signature.size() == argsGen.size() && IntStream.range(0, 
argsGen.size()).allMatch(i -> 
argsGen.get(i).conformsTo(signature.get(i).type))) {
-                    return true;
-                }
+        if (o instanceof FEELFunction oFn) {
+            List<List<Param>> parameters = oFn.getParameters();
+            if(parameters.isEmpty()){

Review Comment:
   ```suggestion
               if (parameters.isEmpty()) {
   ```
   Please use the same formatting style of the code base



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