Buggy code:
public class DefaultOperationDescriptionProvider implements DescriptionProvider { private final String operationName ; private final ResourceDescriptionResolver descriptionResolver ; private final ResourceDescriptionResolver attributeDescriptionResolver ; private final ModelType replyType ; private final ModelType replyValueType ; private final boolean replyAllowNull ; private final DeprecationData deprecationData ; private final AttributeDefinition [ ] replyParameters ; private final AttributeDefinition [ ] parameters ; public DefaultOperationDescriptionProvider ( final String operationName , final ResourceDescriptionResolver descriptionResolver , final AttributeDefinition ... parameters ) { } public DefaultOperationDescriptionProvider ( final String operationName , final ResourceDescriptionResolver descriptionResolver , final DeprecationData deprecationData , final AttributeDefinition ... parameters ) { } public DefaultOperationDescriptionProvider ( final String operationName , final ResourceDescriptionResolver descriptionResolver , final ModelType replyType , final AttributeDefinition ... parameters ) { } public DefaultOperationDescriptionProvider ( final String operationName , final ResourceDescriptionResolver descriptionResolver , final ModelType replyType , final ModelType replyValueType , final AttributeDefinition ... parameters ) { } public DefaultOperationDescriptionProvider ( final String operationName , final ResourceDescriptionResolver descriptionResolver , final ModelType replyType , final ModelType replyValueType , final DeprecationData deprecationData , final AttributeDefinition ... parameters ) { } public DefaultOperationDescriptionProvider ( final String operationName , final ResourceDescriptionResolver descriptionResolver , final ResourceDescriptionResolver attributeDescriptionResolver , final ModelType replyType , final ModelType replyValueType , final DeprecationData deprecationData , final AttributeDefinition [ ] replyParameters , final AttributeDefinition ... parameters ) { } public DefaultOperationDescriptionProvider ( final String operationName , final ResourceDescriptionResolver descriptionResolver , final ResourceDescriptionResolver attributeDescriptionResolver , final ModelType replyType , final ModelType replyValueType , final boolean replyAllowNull , final DeprecationData deprecationData , final AttributeDefinition [ ] replyParameters , final AttributeDefinition ... parameters ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { ModelNode result = new ModelNode ( ) ; final ResourceBundle bundle = descriptionResolver . getResourceBundle ( locale ) ; final ResourceBundle attributeBundle = attributeDescriptionResolver . getResourceBundle ( locale ) ; result . get ( ModelDescriptionConstants . OPERATION_NAME ) . set ( operationName ) ; result . get ( ModelDescriptionConstants . DESCRIPTION ) . set ( descriptionResolver . getOperationDescription ( operationName , locale , bundle ) ) ; result . get ( ModelDescriptionConstants . REQUEST_PROPERTIES ) . setEmptyObject ( ) ; if ( ( parameters ) != null ) { for ( AttributeDefinition definition : parameters ) { definition . addOperationParameterDescription ( result , operationName , attributeDescriptionResolver , locale , attributeBundle ) ; } } final ModelNode reply = result . get ( ModelDescriptionConstants . REPLY_PROPERTIES ) . setEmptyObject ( ) ; if ( ( ( replyType ) != null ) && ( ( replyType ) != ( ModelType . UNDEFINED ) ) ) { reply . get ( ModelDescriptionConstants . TYPE ) . set ( replyType ) ; if ( ( ( replyType ) == ( ModelType . LIST ) ) || ( ( replyType ) == ( ModelType . OBJECT ) ) ) { if ( ( ( replyValueType ) != null ) && ( ( replyValueType ) != ( ModelType . OBJECT ) ) ) { reply . get ( ModelDescriptionConstants . VALUE_TYPE ) . set ( replyValueType ) ; } else if ( ( replyValueType ) != null ) { reply . get ( ModelDescriptionConstants . VALUE_TYPE ) . set ( getReplyValueTypeDescription ( descriptionResolver , locale , bundle ) ) ; } } } if ( ( ( replyParameters ) != null ) && ( ( replyParameters . length ) > 0 ) ) { if ( ( replyParameters . length ) == 1 ) { AttributeDefinition ad = replyParameters [ 0 ] ; ModelNode param = ad . getNoTextDescription ( true ) ; final String description = attributeDescriptionResolver . getOperationParameterDescription ( operationName , ad . getName ( ) , locale , attributeBundle ) ; param . get ( DESCRIPTION ) . set ( description ) ; reply . set ( param ) ; ModelNode deprecated = ad . addDeprecatedInfo ( result ) ; if ( deprecated != null ) { deprecated . get ( REASON ) . set ( attributeDescriptionResolver . getOperationParameterDeprecatedDescription ( operationName , ad . getName ( ) , locale , attributeBundle ) ) ; } } else { <START_BUG> reply . get ( ModelDescriptionConstants . TYPE ) . set ( OBJECT ) ; <END_BUG> for ( AttributeDefinition ad : replyParameters ) { final ModelNode param = ad . addOperationParameterDescription ( new ModelNode ( ) , operationName , attributeDescriptionResolver , locale , bundle ) ; reply . get ( ModelDescriptionConstants . VALUE_TYPE , ad . getName ( ) ) . set ( param ) ; } } } if ( ! ( reply . asList ( ) . isEmpty ( ) ) ) { final String replyDesc = descriptionResolver . getOperationReplyDescription ( operationName , locale , bundle ) ; if ( replyDesc != null ) { reply . get ( ModelDescriptionConstants . DESCRIPTION ) . set ( replyDesc ) ; } } if ( replyAllowNull ) { reply . get ( ModelDescriptionConstants . NILLABLE ) . set ( true ) ; } if ( ( deprecationData ) != null ) { ModelNode deprecated = result . get ( DEPRECATED ) ; deprecated . get ( SINCE ) . set ( deprecationData . getSince ( ) . toString ( ) ) ; deprecated . get ( REASON ) . set ( descriptionResolver . getOperationDeprecatedDescription ( operationName , locale , bundle ) ) ; } return result ; } protected ModelNode getReplyValueTypeDescription ( ResourceDescriptionResolver descriptionResolver , Locale locale , ResourceBundle bundle ) { } }

Fix:
reply . get ( ModelDescriptionConstants . TYPE ) . set ( ( ( replyType ) == null ? ModelType . OBJECT : replyType ) ) ;