The code getCDFVariable(String vtype, int number) uses a lookup table to find the Variable in O(1) time, but this was implemented with just one table for both Z and R variables. I had assumed a file was either all Z variables or all R variables, and this was an incorrect assumption. (R variables are the original CDF variable type and offer no benefit over the newer Z variable type.)
Autoplot contains a copy of this library within its bowels (CDFJavaDataSource), and this was quickly hacked to have two separate tables, one for Z variables and one for R variables, but this change was never migrated back into the library.
The code getCDFVariable(String vtype, int number) uses a lookup table to find the Variable in O(1) time, but this was implemented with just one table for both Z and R variables. I had assumed a file was either all Z variables or all R variables, and this was an incorrect assumption. (R variables are the original CDF variable type and offer no benefit over the newer Z variable type.)
Autoplot contains a copy of this library within its bowels (CDFJavaDataSource), and this was quickly hacked to have two separate tables, one for Z variables and one for R variables, but this change was never migrated back into the library.