docs: private boolean isAlwaysSafeConversion( int fromType,
                                              int toType ) {
  
          if (fromType == toType) return true;
  
          switch (toType) {
              case PropertyType.BOOLEAN:
                  return fromType == PropertyType.BINARY || fromType == PropertyType.STRING;
  
              case PropertyType.DATE:
                  return fromType == PropertyType.DOUBLE || fromType == PropertyType.LONG;
  
              case PropertyType.DOUBLE:
                  // Conversion from DATE could result in out-of-range value
                  return fromType == PropertyType.LONG;
              case PropertyType.LONG:
                  // Conversion from DATE could result in out-of-range value
                  return fromType == PropertyType.DOUBLE;
  
              case PropertyType.PATH:
                  return fromType == PropertyType.NAME;
  
                  // Values of any type MAY fail when converting to these types
              case PropertyType.NAME:
              case PropertyType.REFERENCE:
              case PropertyType.WEAKREFERENCE:
              case org.modeshape.jcr.api.PropertyType.SIMPLE_REFERENCE:
                  return false;
  
                  // Any type can be converted to these types
              case PropertyType.BINARY:
              case PropertyType.STRING:
              case PropertyType.UNDEFINED:
                  return true;
  
              default:
                  throw new IllegalStateException("Unexpected state: " + toType);
          }
      }