Checks if the new {@link PojoSerializer} is compatible with a reconfigured instance.
501146
private static <T> boolean newPojoSerializerIsCompatibleWithReconfiguredSerializer(
			PojoSerializer<T> newPojoSerializer,
			IntermediateCompatibilityResult<T> fieldSerializerCompatibility,
			IntermediateCompatibilityResult<T> preExistingRegistrationsCompatibility,
			LinkedOptionalMap<Class<?>, TypeSerializerSnapshot<?>> registeredSubclassSerializerSnapshots,
			LinkedOptionalMap<Class<?>, TypeSerializerSnapshot<?>> nonRegisteredSubclassSerializerSnapshots) {
		return newPojoHasDifferentSubclassRegistrationOrder(registeredSubclassSerializerSnapshots, newPojoSerializer)
			|| previousSerializerHasNonRegisteredSubclasses(nonRegisteredSubclassSerializerSnapshots)
			|| fieldSerializerCompatibility.isCompatibleWithReconfiguredSerializer()
			|| preExistingRegistrationsCompatibility.isCompatibleWithReconfiguredSerializer();
	}
597861
public boolean isKeySerializer( JType type ) {
        return null != type.isClass() && type.isClass().isAssignableTo( keySerializerType );
    }
635193
@Override
    public int isCompatible(Class<?> target, Object actual) {
        int superCompat = super.isCompatible(target, actual);
        if (superCompat >= 0 && superCompat < 3) {
            return superCompat;
        }

        Class<?> actualClass = actual.getClass();
        if (actualClass == Types.UNDEFINED.getClass() || actualClass == Types.NULL.getClass()) {
            return 3;
        }

        if (JSFunction.class.isAssignableFrom(actualClass)) {
            if (isSingleAbstractMethod(target) != null) {
                return 3;
            }
        }

        return -1;
    }
1116605
public static <T> ImmutableMultisetJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new ImmutableMultisetJsonDeserializer<T>( deserializer );
    }
281778
private static boolean hasSerializableFields(JavaClass cls) {
        Field[] fields = cls.getFields();
        for (Field f : fields) {
            if (!f.isStatic() && !f.isTransient() && !f.isSynthetic()) {
                return true;
            }
        }
        return false;
    }
1321469
protected boolean isRecoverableSdkClientException(SdkClientException ex) {
		if (ex instanceof AmazonServiceException) {
			return KinesisProxy.isRecoverableException((AmazonServiceException) ex);
		}
		// customizations may decide to retry other errors, such as read timeouts
		return false;
	}
1232691
private static void checkWriterCompatibility(RouteDefinition definition) {
		try { // no way to know the accept content at this point
			getWriter(injectionProvider, definition.getReturnType(), definition, null, GenericResponseWriter.class);
		}
		catch (ClassFactoryException e) {
			// ignoring instance creation ... but leaving Illegal argument exceptions to pass
		}
	}
117019
static boolean isRetriable(final FrameworkMethod method, final Throwable thrown) {
        synchronized(retryAnalyzerLoader) {
            for (JUnitRetryAnalyzer analyzer : retryAnalyzerLoader) {
                if (analyzer.retry(method, thrown)) {
                    return true;
                }
            }
        }
        return false;
    }
24990
static Retrofit.Builder createDefaultRetrofitBuilder() {
        final ObjectMapper objectMapper = new ObjectMapper()
                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
                // Register ParameterNamesModule to read parameter name from lombok generated constructor.
                .registerModule(new ParameterNamesModule())
                // Register JSR-310(java.time.temporal.*) module and read number as millsec.
                .registerModule(new JavaTimeModule())
                .configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false);

        return new Retrofit.Builder()
                .addConverterFactory(JacksonConverterFactory.create(objectMapper));
    }
419972
public boolean compatible( PropertySet properties)
    {
    boolean isCompatible;
    Iterator<IDisjunct> disjuncts;
    
    for( disjuncts = getDisjuncts(),
           isCompatible = true;
           

         isCompatible
           && disjuncts.hasNext();

         isCompatible = disjuncts.next().compatible( properties));
    
    return isCompatible;
    }
1281287
public boolean compatible()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "compatible", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "compatible", new Boolean(_compatible));
        return _compatible;
    }
424681
public function areReturnTypesCompatible()
    {
        $numberOfReturnTypes = $this->count();

        if (0 == $numberOfReturnTypes || 1 == $numberOfReturnTypes) {
            return true;
        }

        // <Class_1> | <Class_2> | ... | <Class_n>
        $classes = $this->getObjectLikeReturnTypes();

        // <Class> | <Class_1[]> | <Class_1[]> | ... | <Class_n[]>
        $collections = $this->getTypesBySpecification(new Specification\IsCollection());
        if (\count($collections) > 0 && $this->areReturnTypesObjectCompatible()) {
            return false;
        }

        $summ =
            // array | <Class_1[]> | <Class_2[]> | ... | <Class_n[]>
            (int) $this->areReturnTypesArrayCompatible() +

            // char | uchar | int | uint | long | ulong
            (int) $this->areReturnTypesIntCompatible() +

            // bool
            (int) $this->areReturnTypesBoolCompatible() +

            // istring | string
            (int) $this->areReturnTypesStringCompatible() +

            // double
            (int) $this->areReturnTypesDoubleCompatible();

        // T1 | T2 | ... | Tn
        if ($summ > 1) {
            return false;
        }

        // <Class_1> | <T1>
        if ($this->areReturnTypesObjectCompatible() && $summ > 0) {
            return false;
        }

        // null
        $null = (int) $this->areReturnTypesNullCompatible();

        // <T1> | null
        // <Class_1> | null
        // <Class_1[]> | null
        if (1 == $null && 2 == $this->count()) {
            return true;
        }

        // T1 | T2 | ... | Tn | null
        if (1 == $null && $null + $summ != $this->count()) {
            return false;
        }

        return 1 == $summ;
    }
146524
public TypeSerializer<T> getReconfiguredSerializer() {
		Preconditions.checkState(
			isCompatibleWithReconfiguredSerializer(),
			"It is only possible to get a reconfigured serializer if the compatibility type is %s, but the type is %s",
			Type.COMPATIBLE_WITH_RECONFIGURED_SERIALIZER, resultType);
		return reconfiguredNewSerializer;
	}
351852
def is_json_compat(value):
    

    try:
        value = json.loads(value)
    except ValueError as e:
        raise ValueError('JSON decoding error: ' + str(e))
    except TypeError:
        # Check that the value can be serialized back into json.
        try:
            json.dumps(value)
        except TypeError as e:
            raise ValueError(
                'must be a JSON serializable object: ' + str(e))

    if not isinstance(value, dict):
        raise ValueError(
            'must be specified as a JSON serializable dict or a '
            'JSON deserializable string'
        )

    return True
685269
public static boolean isCompatibleJREVersion(String version) {
		if (version != null && !version.isEmpty()) {
			final Version current = Version.parseVersion(version);
			if (current != null) {
				final Version minJdk = Version.parseVersion(SARLVersion.MINIMAL_JDK_VERSION);
				assert minJdk != null;
				if (current.compareTo(minJdk) >= 0) {
					final Version maxJdk = Version.parseVersion(SARLVersion.MAXIMAL_JDK_VERSION);
					assert maxJdk != null;
					return current.compareTo(maxJdk) <= 0;
				}
			}
		}
		return false;
	}
148822
public boolean isCompatibleWith(String runtimeVersion) {
    if (null == this.minimalSqVersion) {
      // no constraint defined on the plugin
      return true;
    }

    Version effectiveMin = Version.create(minimalSqVersion.getName()).removeQualifier();
    Version effectiveVersion = Version.create(runtimeVersion).removeQualifier();

    if (runtimeVersion.endsWith("-SNAPSHOT")) {
      // check only the major and minor versions (two first fields)
      effectiveMin = Version.create(effectiveMin.getMajor() + "." + effectiveMin.getMinor());
    }

    return effectiveVersion.compareTo(effectiveMin) >= 0;
  }
702352
@Override
    public boolean accepts(final MavenDependency dependency, final List<MavenDependency> dependenciesForResolution, final List<MavenDependency> dependencyAncestors) {
        if (dependency == null) {
            return false;
        }

        if (allowedScopes.contains(dependency.getScope())) {
            return true;
        }

        return false;
    }