Java dependencies. Bug fix in retrievePeripheral so that we do not zero out the reference to the Java Peripheral object.