20001002: bug in java AbstractArray.setDouble

Gordon,

> From: Gordon Maclean <maclean@xxxxxxxxxxxx>
> Subject: bug in java AbstractArray.setDouble
> Organization: National Center for Atmospheric Research
> Keywords: 200010022324.e92NOgb18003 Java netCDF

The above message contained the following:

> There is a error in AbstractArray.setDouble:
> 
> 
>        public void
>         setDouble(int [] index, double value)
>                 throws IOException
>         {
>                 set(index, new Float(value));
>                                ^^^^^
>         }
> 
> As a result, doubles are converted to floats, then back to
> doubles before being written to the netcdf file.

I could not find the class "AbstractArray" in our Java netCDF
package.  I did, however, find the above code in the class
"ucar.multiarray.AbstractAccessor" and made the change you suggested.

Thanks for reporting this.

> *****************************************************
> Gordon Maclean, Software Engineer, 303 497-8794
> Nat'l Center for Atmospheric Research, Boulder CO USA
> *****************************************************

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: