NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdf-java] Opening NetcdfDataset without enhancement

Hi Jon:

Thanks for reporting, that code's pretty green so im not surprised theres still a few glitches. Ill look at it asap.

Jon Blower wrote:
Hi all (esp John),

I just tried to acquire() a NetcdfDataset from cache without any
enhancement.  The javadocs say that I can do this by passing null as
the enhancement enum, e.g:

   NetcdfDataset.acquireDataset(null, filename, null, -1, null, null);

However, I found this gave a NullPointerException (in hashCode() I
think).  Changing the relevant null to an empty EnumSet fixed the
problem:

   NetcdfDataset.acquireDataset(null, filename,
EnumSet.noneOf(Enhance.class), -1, null, null);

Could either the javadocs or the code be fixed please?

Cheers, Jon



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