Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
146 stars 71 forks source link

Improve exception #1153

Closed tdrwenski closed 1 year ago

tdrwenski commented 1 year ago

Description of Changes

This PR would improve the exception you get when trying to read a variable's data that is too large. Previously, the long size would get narrowed to an int and overflow so you'd end up with a NegativeArraySizeException. I think an exception saying the request is too large is slightly nicer than the NegativeArraySizeException.

PR Checklist