There seems to be a little bug or at least a documentation problem with the bundle util.
When i add a bundle in ModuleHook.setup with
BundleUtil.get().addBundle(xxx.class); and remove it in ModuleHook.shutdown with
BundleUtil.get().removeBundle(xxx.class); there is still a reference to my class on the heap. As the built in drivers seem to to use this remove method (the Modbus driver in the api example definitely does), you will always have duplicate classes after a driver restart. This causes problems when trying to debug in development mode, since the VM seems to use parts of the old jar file instead of the newly uploaded one.
When is use
BundleUtil.get().removeBundle(xxx.class.getSimpleName(); instead, everything works as expected.
If this is a intended behavior of BundleUtil.remove(Class) it would be good to mention it in the javadocs.
By the way, is it correct that the 7.4 api still expects api version 3 in ModuleHook.startup?