Clean up left-behind wrappers used to communicate with Java code using 'rJava'.
Details
Field w
contains a wrapper on a Java object used to communicate with
the OmniDriver driver during data acquisition. Once the current connection
between R and a spectrometer ends, these wrappers are invalidated, becoming
useless. However, if present they create a dependency on 'rJava', possibly
triggering errors. In recent versions of 'ooacquire' this wrapper is removed
immediately after acquisition. However, the instrument descriptor of spectral
objects created with versions of 'ooacquire' for some years ago can contain a
member storing a useless Java wrapper. This function removes this field if
present.
Note
Method getInstrDesc()
removes member field w
from the returned
value but does not modify its argument.