public Object getObject() { Class<?> clazz = getObjectClass(); if (clazz == null) { throw new IllegalStateException("Do not know what the class is that represents the JSON data"); } try { return mapper.readValue(getMessage(), clazz); } catch (IOException e) { throw new IllegalStateException("JSON message cannot be converted to object.", e); } } }
public Object getObject() { Class<?> clazz = getObjectClass(); if (clazz == null) { throw new IllegalStateException("Do not know what the class is that represents the JSON data"); } try { return mapper.readValue(getMessage(), clazz); } catch (IOException e) { throw new IllegalStateException("JSON message cannot be converted to object.", e); } } }