Source:
<code>public Response get(@Context final HttpServletRequest request, @Context final HttpServletResponse response, @Context UriInfo uriInfo, @PathParam("folder") final String folderName, @PathParam("path") final String pathParams) { final InitDataObject initDataObject = this.webResource.init (pathParams, false, request, false, null); final User user = initDataObject.getUser(); final Language currentLanguage = WebAPILocator.getLanguageWebAPI().getLanguage(request); final MultivaluedMap<String, String> queryParameters = uriInfo.getQueryParameters(); Map<String, String> dotJSON = null; try { Host site = this.hostAPI.resolveHostName(request.getServerName(), user, false); <START> final String getFilePath = VTLPath + "/" + folderName + "/" + HTTPMethod.GET.fileName + FILE_EXTENSION; <END> Identifier identifier = identifierAPI.find(site, getFilePath); Contentlet getFileContent = contentletAPI.findContentletByIdentifier(identifier.getId(), true, currentLanguage.getId(), user, false); FileAsset getFileAsset = APILocator.getFileAssetAPI().fromContentlet(getFileContent); org.apache.velocity.context.Context context = VelocityUtil.getInstance().getContext(request, response); context.put("urlParams", initDataObject.getParamsMap()); context.put("queryParams", queryParameters); context.put("dotJSON", new HashMap()); StringWriter evalResult = new StringWriter(); try (final InputStream fileAssetIputStream = getFileAsset.getInputStream()) { VelocityUtil.getEngine().evaluate(context, evalResult, "", fileAssetIputStream); dotJSON = (Map<String, String>) context.get("dotJSON"); } } catch(DotContentletStateException e) { final String errorMessage = "Unable to find velocity file '" + HTTPMethod.GET.fileName + FILE_EXTENSION + "' under path '" + VTLPath + "'"; Logger.error(this, errorMessage, e); return ResponseUtil.mapExceptionResponse(new DotDataException(errorMessage)); } catch(Exception e) { Logger.error(this,"Exception on DIY endpoint. GET method: " + e.getMessage(), e); return ResponseUtil.mapExceptionResponse(e); } return Response.ok(new ResponseEntityView(dotJSON)).build(); }</code><technical_language>a StringBuilder StringPool.SLASH</technical_language>

Target:
public Response get(@Context final HttpServletRequest request, @Context final HttpServletResponse response, @Context UriInfo uriInfo, @PathParam("folder") final String folderName, @PathParam("path") final String pathParams) { final InitDataObject initDataObject = this.webResource.init (pathParams, false, request, false, null); final User user = initDataObject.getUser(); final Language currentLanguage = WebAPILocator.getLanguageWebAPI().getLanguage(request); final MultivaluedMap<String, String> queryParameters = uriInfo.getQueryParameters(); Map<String, String> dotJSON; try { final Host site = this.hostAPI.resolveHostName(request.getServerName(), APILocator.systemUser(), false); final String getFilePath = VTLPath + StringPool.SLASH + folderName + StringPool.SLASH + HTTPMethod.GET.fileName + FILE_EXTENSION; final Identifier identifier = identifierAPI.find(site, getFilePath); final Contentlet getFileContent = contentletAPI.findContentletByIdentifier(identifier.getId(), true, currentLanguage.getId(), user, true); final FileAsset getFileAsset = APILocator.getFileAssetAPI().fromContentlet(getFileContent); final org.apache.velocity.context.Context context = VelocityUtil.getInstance().getContext(request, response); context.put("urlParams", initDataObject.getParamsMap()); context.put("queryParams", queryParameters); context.put("dotJSON", new HashMap()); final StringWriter evalResult = new StringWriter(); try (final InputStream fileAssetIputStream = getFileAsset.getInputStream()) { VelocityUtil.getEngine().evaluate(context, evalResult, "", fileAssetIputStream); dotJSON = (Map<String, String>) context.get("dotJSON"); } } catch(DotContentletStateException e) { final String errorMessage = "Unable to find velocity file '" + HTTPMethod.GET.fileName + FILE_EXTENSION + "' under path '" + VTLPath + "'"; Logger.error(this, errorMessage, e); return ResponseUtil.mapExceptionResponse(new DotDataException(errorMessage)); } catch(Exception e) { Logger.error(this,"Exception on VTL endpoint. GET method: " + e.getMessage(), e); return ResponseUtil.mapExceptionResponse(e); } return Response.ok(new ResponseEntityView(dotJSON)).build(); }