protected static boolean configEqualKubernetesDTO(@NotNull Object entity1, @NotNull Object entity2, @NotNull Class<?> clazz) {
        // lets iterate through the objects making sure we've not
        BeanInfo beanInfo = null;
        try {
            beanInfo = Introspector.getBeanInfo(clazz);
        } catch (IntrospectionException e) {
            LOG.warn("Failed to get beanInfo for " + clazz.getName() + ". " + e, e);
            return false;
        }
        try {
            PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
                String name = propertyDescriptor.getName();
                if (ignoredProperties.contains(name)) {
                    continue;
                }
                Method readMethod = propertyDescriptor.getReadMethod();
                if (readMethod != null) {
                    Object value1 = invokeMethod(entity1, readMethod);
                    Object value2 = invokeMethod(entity2, readMethod);
                    if (value1 != null && value2 != null && !configEqual(value1, value2)) {
                        return false;
                    }
                }
            }
            return true;
        } catch (Exception e) {
            return false;
        }
    }
protected static boolean configEqualKubernetesDTO(@NotNull Object entity1, @NotNull Object entity2, @NotNull Class<?> clazz) {
        
        BeanInfo beanInfo = null;
        try {
            beanInfo = Introspector.getBeanInfo(clazz);
        } catch (IntrospectionException e) {
            LOG.warn("Failed to get beanInfo for " + clazz.getName() + ". " + e, e);
            return false;
        }
        try {
            PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
                String name = propertyDescriptor.getName();
                if (ignoredProperties.contains(name)) {
                    continue;
                }
                Method readMethod = propertyDescriptor.getReadMethod();
                if (readMethod != null) {
                    Object value1 = invokeMethod(entity1, readMethod);
                    Object value2 = invokeMethod(entity2, readMethod);
                    if (value1 != null && value2 != null && !configEqual(value1, value2)) {
                        return false;
                    }
                }
            }
            return true;
        } catch (Exception e) {
            return false;
        }
    }
protected static boolean configEqualKubernetesDTO ( @ NotNull Object entity1 , @ NotNull Object entity2 , @ NotNull Class < ? > clazz ) { // lets iterate through the objects making sure we've not BeanInfo beanInfo = null ; try { beanInfo = Introspector . getBeanInfo ( clazz ) ; } catch ( IntrospectionException e ) { LOG . warn ( "Failed to get beanInfo for " + clazz . getName ( ) + ". " + e , e ) ; return false ; } try { PropertyDescriptor [ ] propertyDescriptors = beanInfo . getPropertyDescriptors ( ) ; for ( PropertyDescriptor propertyDescriptor : propertyDescriptors ) { String name = propertyDescriptor . getName ( ) ; if ( ignoredProperties . contains ( name ) ) { continue ; } Method readMethod = propertyDescriptor . getReadMethod ( ) ; if ( readMethod != null ) { Object value1 = invokeMethod ( entity1 , readMethod ) ; Object value2 = invokeMethod ( entity2 , readMethod ) ; if ( value1 != null && value2 != null && ! configEqual ( value1 , value2 ) ) { return false ; } } } return true ; } catch ( Exception e ) { return false ; } }
Compares 2 instances of the given Kubernetes DTO class to see if the user has changed their configuration.
<p/>
This method will ignore properties {@link #ignoredProperties} such as status or timestamp properties
Compares 2 instances of the given Kubernetes DTO class to see if the user has changed their configuration . <p / > This method will ignore properties {