code: @Override
    public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
      if (pvalue == null) {
        return true;
      }
      try {
        final Object field1Value = BeanPropertyReaderUtil.getNullSaveProperty(pvalue, field1Name);
        final Object field2Value = BeanPropertyReaderUtil.getNullSaveProperty(pvalue, field2Name);
        if ((field1Value == null
            || field1Value instanceof String && StringUtils.isEmpty((String) field1Value))
            && (field2Value == null
                || field2Value instanceof String && StringUtils.isEmpty((String) field2Value))) {
          return true;
        }
        if (Objects.equals(field1Value, field2Value)) {
          switchContext(pcontext);
          return false;
        }
        return true;
      } catch (final Exception ignore) {
        switchContext(pcontext);
        return false;
      }
    }
docs: {@inheritDoc} check if given object is valid.
  
  @see javax.validation.ConstraintValidator#isValid(Object,
  javax.validation.ConstraintValidatorContext)