- Sone sone = webInterface.getCore().getSone(identity, false);
- if (sone != null) {
- webInterface.getCore().distrustSone(currentSone, sone);
+ Optional<Sone> sone = webInterface.getCore().getSone(identity);
+ if (sone.isPresent()) {
+ webInterface.getCore().distrustSone(currentSone, sone.get());