code: public int differenceFound(Difference difference) {
          int returnValue = evaluate(difference);    
  
          switch (returnValue) {
          case RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL:
              return returnValue;
          case RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR:
              identical = false;
              haltComparison = false;
              break;
          case RETURN_ACCEPT_DIFFERENCE:
              identical = false;
              if (difference.isRecoverable()) {
                  haltComparison = false;
              } else {
                  similar = false;
                  haltComparison = true;
              }
              break;
          case RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT:
              identical = similar = false;
              haltComparison = true;
              break;
          default:
              throw new IllegalArgumentException(returnValue
                                                 + " is not a defined DifferenceListener.RETURN_... value");
          }
          if (haltComparison) {
              messages.append("\n[different]");
          } else {
              messages.append("\n[not identical]");
          }
          appendDifference(messages, difference);
          return returnValue;
      }
docs: DifferenceListener implementation.
  If the {@link Diff#overrideDifferenceListener overrideDifferenceListener}
  method has been called then the interpretation of the difference
  will be delegated.
  @param difference
  @return a DifferenceListener.RETURN_... constant indicating how the
  difference was interpreted.
  Always RETURN_ACCEPT_DIFFERENCE if the call is not delegated.