home Forums # Technical Support Error Operand "OR" (Java) Reply To: Error Operand "OR" (Java)

#1867

Hi,

effectively, there was a bug in the Antecedent class of fuzzylite. The master and develop branches have been updated. Specifically, in Antecedent, lines 243-245:

            if ((state & S_AND_OR) > 0) {
                if (Rule.FL_AND.equals(token) || Rule.FL_OR.equals(token)) {
                    if (expressionStack.size() != 2) {

the correct condition is if (expressionStack.size() < 2) {:

            if ((state & S_AND_OR) > 0) {
                if (Rule.FL_AND.equals(token) || Rule.FL_OR.equals(token)) {
                    if (expressionStack.size() < 2) {

This bug is not present in fuzzylite C++.

You may either correct your sources or download the zip from the master branch here

Thank you for your time posting this issue.

Cheers.