[svn-r28905] Purpose: Fix user reported problem

Description:
    User Adam Rosenberger reported a failure when using the member function
    AbstractDs::getArrayType().  This problem was caused by missing
    initialization of the ArrayType's members in some cases.
Solution:
    - Added ArrayType::setArrayInfo() to retrieve rank and dimensions of
      an array and store them in memory for easy access.
    - Re-factored a few functions to use the new function.
    - We'll give him 1.8.16 patch
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
This commit is contained in:
Binh-Minh Ribler
2016-01-15 10:53:33 -05:00
parent c09393ed0a
commit 0d68aa89ce
9 changed files with 407 additions and 57 deletions

View File

@@ -141,8 +141,11 @@ ArrayType AbstractDs::getArrayType() const
// depending on which object invokes getArrayType. Then, create and
// return the ArrayType object
try {
// Create ArrayType and set values this way to work around the
// problem described in the JIRA issue HDFFV-7947
ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_type());
arraytype.setArrayInfo();
return(arraytype);
}
catch (DataSetIException E) {