Github user YolandaMDavis commented on a diff in the pull request: https://github.com/apache/nifi/pull/564#discussion_r70169616 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-jolt-transform-json-ui/src/main/java/org/apache/nifi/web/standard/api/transformjson/TransformJSONResource.java --- @@ -84,6 +84,36 @@ public Response executeSpec(JoltSpecificationDTO specificationDTO) { } + protected Transform getTransformation(JoltSpecificationDTO specificationDTO) throws Exception{ + + Object specJson = getSpecificationJsonObject(specificationDTO.getSpecification()); + String transformName = specificationDTO.getTransform(); + String modules = specificationDTO.getModules(); + + ClassLoader customClassLoader = null; + Transform transform ; + if(modules != null && !modules.isEmpty()){ + customClassLoader = ClassLoaderUtils.getCustomClassLoader(specificationDTO.getModules(),this.getClass().getClassLoader(), getJarFilenameFilter()); + } + + if(transformName.equals("jolt-transform-custom")) { + transform = TransformFactory.getCustomTransform(customClassLoader,specificationDTO.getCustomClass(), specJson); --- End diff -- agreed this code should be improved in general, which I'll take care of. The case I should be covering here is the fact that customClassLoader could be used with a custom transform or other transforms (such as a chain which can contain custom transformations). The code assumes that if you selected custom you should have a module set which isn't good to do. I'll update and get it out here.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---