- Sone sone = getSone(parameters, "Sone", true, true);
- getCore().lockSone(sone);
- return new Response("SoneLocked", new SimpleFieldSetBuilder().put("Sone", sone.getId()).get());
+ Optional<Sone> sone = getSone(parameters, "Sone", true, true);
+ getCore().lockSone(sone.get());
+ return new Response("SoneLocked", new SimpleFieldSetBuilder().put("Sone", sone.get().getId()).get());