Source:
<code>protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { HttpRequest request = (HttpRequest) msg; JsonObject root = Json.createReader( new StringReader(request.getContent().toString(StandardCharsets.US_ASCII))).readObject(); Position position = new Position(); position.setProtocol(getProtocolName()); position.setValid(true); position.setLatitude(root.getJsonNumber("lat").doubleValue()); position.setLongitude(root.getJsonNumber("lon").doubleValue()); <START> try { <END> position.setSpeed(UnitsConverter.knotsFromCps(root.getInt("vel"))); } catch (Exception e) { } try { position.setAltitude(root.getInt("alt")); } catch (Exception e) { } try { position.setCourse(root.getInt("cog")); } catch (Exception e) { } try { position.setAccuracy(root.getInt("acc")); } catch (Exception e) { } try { position.set("t", root.getString("t")); } catch (Exception e) { } try { position.set(Position.KEY_BATTERY, root.getInt("batt")); } catch (Exception e) { } long timestamp = root.getJsonNumber("tst").longValue(); if (timestamp < Integer.MAX_VALUE) { timestamp *= 1000; } position.setTime(new Date(timestamp)); DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, root.getString("tid")); if (deviceSession == null) { sendResponse(channel, HttpResponseStatus.BAD_REQUEST); return null; } position.setDeviceId(deviceSession.getDeviceId()); if (position.getFixTime() == null) { position.setTime(new Date()); } if (position.getDeviceId() != 0) { sendResponse(channel, HttpResponseStatus.OK); return position; } else { sendResponse(channel, HttpResponseStatus.BAD_REQUEST); return null; } }</code><technical_language>Please remove try/catch</technical_language>

Target:
protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { HttpRequest request = (HttpRequest) msg; JsonObject root = Json.createReader( new StringReader(request.getContent().toString(StandardCharsets.US_ASCII))).readObject(); Position position = new Position(); position.setProtocol(getProtocolName()); position.setValid(true); position.setLatitude(root.getJsonNumber("lat").doubleValue()); position.setLongitude(root.getJsonNumber("lon").doubleValue()); if (root.containsKey("vel")) { position.setSpeed(UnitsConverter.knotsFromCps(root.getInt("vel"))); } if (root.containsKey("alt")) { position.setAltitude(root.getInt("alt")); } if (root.containsKey("cog")) { position.setCourse(root.getInt("cog")); } if (root.containsKey("acc")) { position.setAccuracy(root.getInt("acc")); } if (root.containsKey("t")) { position.set("t", root.getString("t")); } if (root.containsKey("batt")) { position.set(Position.KEY_BATTERY, root.getInt("batt")); } if (root.containsKey("topic")) { position.set("topic", root.getString("topic")); } long timestamp = root.getJsonNumber("tst").longValue(); if (timestamp < Integer.MAX_VALUE) { timestamp *= 1000; } position.setTime(new Date(timestamp)); DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, root.getString("tid")); if (deviceSession == null) { sendResponse(channel, HttpResponseStatus.BAD_REQUEST); return null; } position.setDeviceId(deviceSession.getDeviceId()); sendResponse(channel, HttpResponseStatus.OK); return position; }