Source:
<code>private void handleAdditionalAnnotation(List<Parameter> parameters, Annotation annotation, final Type type, Set<Type> typesToSkip) { if (CLASS_BEAN_PARAM != null && CLASS_BEAN_PARAM.isAssignableFrom(annotation.getClass())) { final BeanDescription beanDesc = mapper.getSerializationConfig().introspect(constructType(type)); final List<BeanPropertyDefinition> properties = beanDesc.findProperties(); for (final BeanPropertyDefinition propDef : properties) { final AnnotatedField field = propDef.getField(); final AnnotatedMethod setter = propDef.getSetter(); final AnnotatedMethod getter = propDef.getGetter(); final List<Annotation> paramAnnotations = new ArrayList<Annotation>(); final Iterator<SwaggerExtension> extensions = SwaggerExtensions.chain(); Type paramType = null; if (field != null) { paramType = field.getRawType(); <START> for (final Annotation fieldAnnotation : field.getAllAnnotations().annotations()) { <END> if (!paramAnnotations.contains(fieldAnnotation)) { paramAnnotations.add(fieldAnnotation); } } } if (setter != null) { if (paramType == null) { paramType = setter.getRawParameterTypes() != null ? setter.getRawParameterTypes()[0] : null; } for (final Annotation fieldAnnotation : setter.getAllAnnotations().annotations()) { if (!paramAnnotations.contains(fieldAnnotation)) { paramAnnotations.add(fieldAnnotation); } } } if (getter != null) { if (paramType == null) { paramType = getter.getRawReturnType(); } for (final Annotation fieldAnnotation : getter.getAllAnnotations().annotations()) { if (!paramAnnotations.contains(fieldAnnotation)) { paramAnnotations.add(fieldAnnotation); } } } if (paramType == null) { continue; } List<Parameter> extracted = extensions.next().extractParameters(paramAnnotations, paramType, typesToSkip, extensions); for (Parameter param : extracted) { if (ParameterProcessor.applyAnnotations(null, param, paramType, paramAnnotations) != null) { parameters.add(param); } } } } }</code><technical_language>a null check added</technical_language>

Target:
private void handleAdditionalAnnotation(List<Parameter> parameters, Annotation annotation, final Type type, Set<Type> typesToSkip) { if (CLASS_BEAN_PARAM != null && CLASS_BEAN_PARAM.isAssignableFrom(annotation.getClass())) { final BeanDescription beanDesc = mapper.getSerializationConfig().introspect(constructType(type)); final List<BeanPropertyDefinition> properties = beanDesc.findProperties(); for (final BeanPropertyDefinition propDef : properties) { final AnnotatedField field = propDef.getField(); final AnnotatedMethod setter = propDef.getSetter(); final AnnotatedMethod getter = propDef.getGetter(); final List<Annotation> paramAnnotations = new ArrayList<Annotation>(); final Iterator<SwaggerExtension> extensions = SwaggerExtensions.chain(); Type paramType = null; if (field != null) { paramType = field.getRawType(); for (final Annotation fieldAnnotation : annotations(field.getAllAnnotations())) { if (!paramAnnotations.contains(fieldAnnotation)) { paramAnnotations.add(fieldAnnotation); } } } if (setter != null) { if (paramType == null) { paramType = setter.getRawParameterTypes() != null ? setter.getRawParameterTypes()[0] : null; } for (final Annotation fieldAnnotation : annotations(setter.getAllAnnotations())) { if (!paramAnnotations.contains(fieldAnnotation)) { paramAnnotations.add(fieldAnnotation); } } } if (getter != null) { if (paramType == null) { paramType = getter.getRawReturnType(); } for (final Annotation fieldAnnotation : annotations(getter.getAllAnnotations())) { if (!paramAnnotations.contains(fieldAnnotation)) { paramAnnotations.add(fieldAnnotation); } } } if (paramType == null) { continue; } List<Parameter> extracted = extensions.next().extractParameters(paramAnnotations, paramType, typesToSkip, extensions); for (Parameter param : extracted) { if (ParameterProcessor.applyAnnotations(null, param, paramType, paramAnnotations) != null) { parameters.add(param); } } } } }