152153154155156157158159160161162
service = get(i); if (service != null) { if (service.getClass().isAssignableFrom(newService.getClass())) { try { service.stop(); } catch (Exception e) { Context.getCurrentLogger().log(Level.WARNING, "Unable to stop service replaced", e); }