* @param name
* @param clazz
* @return true if stored unshared
*/
private boolean checkFieldInfo(final String name, final Class<?> clazz) {
final FieldInfoForSerialization fieldInfo = fieldInfoMap.get(name);
if (fieldInfo == null) {
throwIllegalArgumentException(name, clazz, null);
}
try {
if (clazz != null
&& !fieldInfo.getFieldTypeInfo().getObjectClass()
.isAssignableFrom(clazz)) {
throwIllegalArgumentException(name, clazz, null);
}
} catch (ClassInfoException exception) {
throwIllegalArgumentException(name, clazz, exception);
}
return fieldInfo.isUnshared();
}