Source:
<code>protected Feature getFeature(JSONObject jsonObject) throws ActionParamsException, JSONException, FactoryException { boolean flipFeature = PropertyUtil.getOptional("actionhandler.AbstractFeatureHandler.forceXY", false); Feature feature = new Feature(); OskariLayer layer = getLayer(jsonObject.optString("layerId")); String srsName = JSONHelper.getStringFromJSON(jsonObject, "srsName", "EPSG:3067"); CoordinateReferenceSystem crs = CRS.decode(srsName); WFSLayerAttributes attrs = new WFSLayerAttributes(layer.getAttributes()); WFSLayerCapabilities caps = new WFSLayerCapabilities(layer.getCapabilities()); String layerName = layer.getName(); if(layerName.indexOf(":") != -1){ layerName = layerName.substring(layerName.indexOf(":")+1); <START> layerName.trim(); <END> } feature.setLayerName(layerName); feature.setNamespaceURI(attrs.getNamespaceURL()); feature.setGMLGeometryProperty(caps.getGeometryAttribute()); feature.setId(jsonObject.getString("featureId")); if(jsonObject.has("featureFields")) { JSONArray jsonArray = jsonObject.getJSONArray("featureFields"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject property = jsonArray.getJSONObject(i); feature.addProperty(property.getString("key"), property.getString("value")); } } if (jsonObject.has("geometries")) { JSONObject geometries = jsonObject.getJSONObject("geometries"); String geometryType = geometries.getString("type"); if(!isAllowedGeomType(geometryType)) { throw new ActionParamsException("Invalid geometry type: " + geometryType); } JSONArray data = geometries.getJSONArray("data"); Geometry geometry = getGeometry(geometryType, data, getSrid(srsName, 3067)); if(ProjectionHelper.isFirstAxisNorth(crs) || flipFeature) { ProjectionHelper.flipFeatureYX(geometry); } feature.setGeometry(geometry); } return feature; }</code><technical_language>String returned trim() is ignored, this line</technical_language>

Target:
protected Feature getFeature(JSONObject jsonObject) throws ActionParamsException, JSONException, FactoryException { boolean flipFeature = PropertyUtil.getOptional("actionhandler.AbstractFeatureHandler.forceXY", false); Feature feature = new Feature(); OskariLayer layer = getLayer(jsonObject.optString("layerId")); String srsName = JSONHelper.getStringFromJSON(jsonObject, "srsName", "EPSG:3067"); CoordinateReferenceSystem crs = CRS.decode(srsName); WFSLayerAttributes attrs = new WFSLayerAttributes(layer.getAttributes()); WFSLayerCapabilities caps = new WFSLayerCapabilities(layer.getCapabilities()); String layerName = layer.getName(); if(layerName.indexOf(":") != -1){ layerName = (layerName.substring(layerName.indexOf(":")+1)).trim(); } feature.setLayerName(layerName); feature.setNamespaceURI(attrs.getNamespaceURL()); feature.setGMLGeometryProperty(caps.getGeometryAttribute()); feature.setId(jsonObject.getString("featureId")); if(jsonObject.has("featureFields")) { JSONArray jsonArray = jsonObject.getJSONArray("featureFields"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject property = jsonArray.getJSONObject(i); feature.addProperty(property.getString("key"), property.getString("value")); } } if (jsonObject.has("geometries")) { JSONObject geometries = jsonObject.getJSONObject("geometries"); String geometryType = geometries.getString("type"); if(!isAllowedGeomType(geometryType)) { throw new ActionParamsException("Invalid geometry type: " + geometryType); } JSONArray data = geometries.getJSONArray("data"); Geometry geometry = getGeometry(geometryType, data, getSrid(srsName, 3067)); if(ProjectionHelper.isFirstAxisNorth(crs) || flipFeature) { ProjectionHelper.flipFeatureYX(geometry); } feature.setGeometry(geometry); } return feature; }