11package org .jabref .http .server .command ;
22
3+ import com .fasterxml .jackson .core .JsonProcessingException ;
4+ import com .fasterxml .jackson .databind .ObjectMapper ;
35import jakarta .inject .Inject ;
46import jakarta .ws .rs .Consumes ;
57import jakarta .ws .rs .POST ;
810import jakarta .ws .rs .core .MediaType ;
911import jakarta .ws .rs .core .Response ;
1012import org .glassfish .hk2 .api .ServiceLocator ;
11- import tools .jackson .core .JacksonException ;
12- import tools .jackson .databind .ObjectMapper ;
13- import tools .jackson .databind .json .JsonMapper ;
1413
1514@ Path ("commands" )
1615public class CommandResource {
@@ -22,13 +21,13 @@ public class CommandResource {
2221 @ Consumes ({MediaType .APPLICATION_JSON })
2322 @ Produces ({MediaType .APPLICATION_JSON })
2423 public Response dispatchCommand (String jsonCommand ) {
25- ObjectMapper objectMapper = new JsonMapper ();
24+ ObjectMapper objectMapper = new ObjectMapper ();
2625 try {
2726 Command command = objectMapper .readValue (jsonCommand , Command .class );
2827 command .setServiceLocator (serviceLocator );
2928
3029 return command .execute ();
31- } catch (JacksonException e ) {
30+ } catch (JsonProcessingException e ) {
3231 return Response .serverError ().entity (e .getMessage ()).build ();
3332 }
3433 }
0 commit comments