mbeckerle commented on a change in pull request #273: WIP: Add User Defined Functions Capability URL: https://github.com/apache/incubator-daffodil/pull/273#discussion_r334642164
########## File path: daffodil-udf/src/test/java/org/badudfs/evaluate/StringFunctions/StringFunctionsProvider.java ########## @@ -16,26 +16,17 @@ */ package org.badudfs.evaluate.StringFunctions; -import org.apache.daffodil.udf.*; +import org.apache.daffodil.udf.UserDefinedFunctionProvider; -public class StringFunctionsProvider extends UDFunctionProvider { - public StringFunctionsProvider() { - super.setFunctionClasses( new Class<?>[] { FuncA.class, Replace.class } ); - } - - public Object lookupFunctionClass(String namespace, String name) { - Object functionClass = null; - - String nn = String.join("_", namespace, name); - - switch (nn) { - case "com.ext.badudfs.StringFunctions_replace": - functionClass = new Replace(); - break; - case "com.ext.badudfs.StringFunctions_funcA": - functionClass = new FuncA(); - break; - } - return functionClass; - } +/** + * UDF Provider for Negative Unit test + * + * Contains classes with invalid or missing evaluate functions + */ +public class StringFunctionsProvider extends UserDefinedFunctionProvider { + @Override + public Class<?>[] getUserDefinedFunctionClasses() { + // TODO Auto-generated method stub Review comment: Wait a sec? Are these auto-generated stubs? I'm used to seeing that with a print-stack-trace or such, but perhaps these are as generated? In any case the comments should go. But if these are stubs, why is that ok? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services