You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
Hmm, I think the fix should be made upstream. In Array.factory() (now Array.makeFromJavaArray() in 5.0), detect if javaArray is a reference type, and simply create a list for it if so. For example, a String argument becomes a one-element String[]. That's best because all of the downstream code expects for javaArray to actually be, you know, an array.
Whatever solution we choose, we'll need to add some thorough unit testing, which we obviously lack right now. #600 is also related.
Hi,
This impact Netcdf Java 4.6.2 and even latest alpha 5.0.0-alpha3:
https://github.com/Unidata/thredds/blob/v5.0.0-alpha3/cdm/src/main/java/ucar/ma2/Array.java
In the method reflectArrayCopyIn below:
When the jArray is only a String, cType became null because this is what getComponentType is supposed to give:
The caller of this method is
Array.factory(Object javaArray)
, and even its javadoc says:Thus the NullPointerException. I recommend adding a check like for example (not tested):
The text was updated successfully, but these errors were encountered: