public Object readObject(Type expectedType, DequeMap<TypeVariable<?>, Type> resolvedTypes) throws SerializationException { int token = readInt(); if (token < 0) { // Negative means a previous object // Transform negative 1-based to 0-based. return getDecodedObject(-token); } // Positive means a new object String typeSignature = getString(token); if (typeSignature == null) { // a null string means a null instance return null; } if (isSimpleClass(expectedType) && !resolvedTypes.isEmpty()) { // Start a new scope for resolving type variables. This is a workaround for false sharing // because the type checker doesn't implement type variables properly. // // For example, if expectedType is Serializable and the actual value is a LinkedHashMap, we // don't want any of LinkedHashMap, HashMap, or Map to inherit any bindings for their K,V // variables from the surrounding content. // Fixes issue 7628. resolvedTypes = new DequeMap<TypeVariable<?>, Type>(); } return deserialize(typeSignature, expectedType, resolvedTypes); }
TypeVariable<?> variableType = classGenericTypes[i]; if (addTypes) { resolvedTypes.add(variableType, actualTypes[i]); } else { resolvedTypes.remove(variableType); for (TypeVariable<?> classParamType : classParams) { if (addTypes) { resolvedTypes.add(classParamType, classParamType); } else { resolvedTypes.remove(classParamType);
DequeMap<TypeVariable<?>, Type> resolvedTypes = new DequeMap<TypeVariable<?>, Type>();
TypeVariable<?> variableType = classGenericTypes[i]; if (addTypes) { resolvedTypes.add(variableType, actualTypes[i]); } else { resolvedTypes.remove(variableType); for (TypeVariable<?> classParamType : classParams) { if (addTypes) { resolvedTypes.add(classParamType, classParamType); } else { resolvedTypes.remove(classParamType);
DequeMap<TypeVariable<?>, Type> resolvedTypes = new DequeMap<TypeVariable<?>, Type>();
public Object readObject(Type expectedType, DequeMap<TypeVariable<?>, Type> resolvedTypes) throws SerializationException { int token = readInt(); if (token < 0) { // Negative means a previous object // Transform negative 1-based to 0-based. return getDecodedObject(-token); } // Positive means a new object String typeSignature = getString(token); if (typeSignature == null) { // a null string means a null instance return null; } if (isSimpleClass(expectedType) && !resolvedTypes.isEmpty()) { // Start a new scope for resolving type variables. This is a workaround for false sharing // because the type checker doesn't implement type variables properly. // // For example, if expectedType is Serializable and the actual value is a LinkedHashMap, we // don't want any of LinkedHashMap, HashMap, or Map to inherit any bindings for their K,V // variables from the surrounding content. // Fixes issue 7628. resolvedTypes = new DequeMap<TypeVariable<?>, Type>(); } return deserialize(typeSignature, expectedType, resolvedTypes); }
TypeVariable<?> variableType = classGenericTypes[i]; if (addTypes) { resolvedTypes.add(variableType, actualTypes[i]); } else { resolvedTypes.remove(variableType); for (TypeVariable<?> classParamType : classParams) { if (addTypes) { resolvedTypes.add(classParamType, classParamType); } else { resolvedTypes.remove(classParamType);
DequeMap<TypeVariable<?>, Type> resolvedTypes = new DequeMap<TypeVariable<?>, Type>();
public Object readObject(Type expectedType, DequeMap<TypeVariable<?>, Type> resolvedTypes) throws SerializationException { int token = readInt(); if (token < 0) { // Negative means a previous object // Transform negative 1-based to 0-based. return getDecodedObject(-token); } // Positive means a new object String typeSignature = getString(token); if (typeSignature == null) { // a null string means a null instance return null; } if (isSimpleClass(expectedType) && !resolvedTypes.isEmpty()) { // Start a new scope for resolving type variables. This is a workaround for false sharing // because the type checker doesn't implement type variables properly. // // For example, if expectedType is Serializable and the actual value is a LinkedHashMap, we // don't want any of LinkedHashMap, HashMap, or Map to inherit any bindings for their K,V // variables from the surrounding content. // Fixes issue 7628. resolvedTypes = new DequeMap<TypeVariable<?>, Type>(); } return deserialize(typeSignature, expectedType, resolvedTypes); }